Page 1 of 1

webservice error?

Posted: Wed Jan 05, 2011 3:28 am
by nicolasVu
[SoapException: The AXIS engine could not find a target service to invoke! targetService is null]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431678 begin_of_the_skype_highlighting +431678 end_of_the_skype_highlighting
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
Email.openemm.EmmWebService_PortService.deleteSubscriber(String in0, String in1, Int32 in2) in C:\Documents and Settings\vupham\Desktop\Email\Email\Web References\openemm\Reference.cs:661
Email.EMMMail.delsubscriber() in C:\Documents and Settings\vupham\Desktop\Email\Email\EMMMail.aspx.cs:26
Email.EMMMail.btnSubmit_Click(Object sender, EventArgs e) in C:\Documents and Settings\vupham\Desktop\Email\Email\EMMMail.aspx.cs:22
System.Web.UI.HtmlControls.HtmlInputButton.OnServerClick(EventArgs e) +111
System.Web.UI.HtmlControls.HtmlInputButton.RaisePostBackEvent(String eventArgument) +109
System.Web.UI.HtmlControls.HtmlInputButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Posted: Wed Jan 05, 2011 1:57 pm
by maschoff
Please provide the context (for example SOAP body of your WS method call) causing this exception.

Posted: Thu Jan 06, 2011 5:37 am
by nicolasVu
SOAP body:
<soapenv:Envelope>
−
<soapenv:Body>
−
<soapenv:Fault>
<faultcode>ns1:Server.NoService</faultcode>
−
<faultstring>
The AXIS engine could not find a target service to invoke! targetService is null
</faultstring>
−
<detail>
<ns2:hostname>localhost.localdomain</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

and source code:

string username = ConfigurationManager.AppSettings["UserName"].ToString();
string password = ConfigurationManager.AppSettings["Pass"].ToString();
openemm.EmmWebService_PortService emm = new openemm.EmmWebService_PortService();
protected void addsubscriber()
{
try
{

openemm.StringArrayType arrValue = new openemm.StringArrayType();
string[] paraValue = new string[4];
paraValue[0] = "phamquocvu.itvn@gmail.com";
paraValue[1] = "2";
paraValue[2] = "1";
paraValue[3] = "3";
arrValue.x = paraValue;

openemm.StringArrayType arrName = new openemm.StringArrayType();
string[] paraName = new string[4];
paraName[0] = "email";
paraName[1] = "gender";
paraName[2] = "mailtype";
paraName[3] = "mailinglist";
arrName.x = paraName;

emm.addSubscriber(username, password, true, "email", true, arrName, arrValue);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}

Posted: Thu Jan 06, 2011 4:02 pm
by maschoff
Sorry, I did mean the SOAP body of your WS request, not of the response.

Posted: Fri Jan 07, 2011 4:39 am
by nicolasVu
i fixed it.
thank you, so much :)

Posted: Fri Jan 07, 2011 4:43 am
by nicolasVu
ah! i add subscribe via webservice
this is my source:
OpenEMM.StringArrayType arrName = new OpenEMM.StringArrayType();
string[] paraName = new string[4];
paraName[0] = "email";
paraName[1] = "mailinglistID";
paraName[2] = "mailtype";
paraName[3] = "gender";
arrName.x = paraName;

OpenEMM.StringArrayType arrValue = new OpenEMM.StringArrayType();
string[] paraValue = new string[4];
paraValue[0] = txtEmail.Value;
paraValue[1] = "3";
paraValue[2] = "1";
paraValue[3] = "2";
arrValue.x = paraValue;

int addsub = emm.addSubscriber(username, password, true, "email", true, arrName, arrValue);

why cannot i set mailinglist for subscriber, although the mailingid is exactly

Posted: Fri Jan 07, 2011 10:56 am
by maschoff
I see! arrName and arrValue are intended for custom-specific fields you created (like zip code, city, country, etc.). You can not use those fields to set a binding to a certain maillist.

To put an added subscriber on a certain maillist you must call WS method "setSubscriberBinding" and use the ID which was returned by "addSubscriber" as customerID.

Posted: Mon Jan 10, 2011 4:57 am
by nicolasVu
thanks! i resolved it.
but i must call addsubscriber() method twice to have exactly return value

Source:
OpenEMM.StringArrayType arrName = new OpenEMM.StringArrayType();
string[] paraName = new string[3];
paraName[0] = "email";
paraName[1] = "gender";
paraName[2] = "mailtype";
arrName.x = paraName;

OpenEMM.StringArrayType arrValue = new OpenEMM.StringArrayType();
string[] paraValue = new string[3];
paraValue[0] = txtEmail.Value;
paraValue[1] = "2";
paraValue[2] = "1";
arrValue.x = paraValue;

emm.addSubscriber(username, password, true, "email", true, arrName, arrValue);
int addsub = emm.addSubscriber(username, password, true, "email", true, arrName, arrValue);

int bind = emm.setSubscriberBinding(username, password, addsub, 3, 0, 1, "W", "active", 0);
this line return value = 0
emm.addSubscriber(username, password, true, "email", true, arrName, arrValue);
and i have to add this line below:
and this times, it return true value.
int addsub = emm.addSubscriber(username, password, true, "email", true, arrName, arrValue);
why?

i'm using Ver. 6.2

Posted: Mon Jan 10, 2011 5:23 am
by nicolasVu
And when i Create New Recipient in Web app (openemm)

i can't create new recipient and add it into mailinglist in the same time.

i have to create new recipient and then edit it to add one into mailist

and Problem with Form in OpenEMM 6.2

Posted: Mon Jan 10, 2011 7:56 am
by nicolasVu
when i submit recipient in en_soi Form of Open EMM. it always redirect to error form, Although this recipient was added into database.

en_soi and en_soi_confirm are default forms. and i don't change it

not only that form is, but also other forms example: en_unsubscribe v.v.v

anything relative to subscribe and unsubscribe recipient

Posted: Tue Jan 11, 2011 3:23 am
by nicolasVu
Nobody can help me? :(

Posted: Tue Jan 11, 2011 12:03 pm
by maschoff
1. This is a different problem and belongs in a separate posting.

2. Please use the search function and you will find examples of working code in this forum.