webservice error?

Use this forum to report bugs and to check for bugfixes and new releases of OpenEMM

Moderator: moderator

nicolasVu
Posts: 15
Joined: Fri Nov 05, 2010 8:25 am

webservice error?

Post 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
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Please provide the context (for example SOAP body of your WS method call) causing this exception.
OpenEMM Maintainer
nicolasVu
Posts: 15
Joined: Fri Nov 05, 2010 8:25 am

Post 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);
}
}
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Sorry, I did mean the SOAP body of your WS request, not of the response.
OpenEMM Maintainer
nicolasVu
Posts: 15
Joined: Fri Nov 05, 2010 8:25 am

Post by nicolasVu »

i fixed it.
thank you, so much :)
nicolasVu
Posts: 15
Joined: Fri Nov 05, 2010 8:25 am

Post 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
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post 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.
OpenEMM Maintainer
nicolasVu
Posts: 15
Joined: Fri Nov 05, 2010 8:25 am

Post 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
Last edited by nicolasVu on Mon Jan 10, 2011 7:38 am, edited 1 time in total.
nicolasVu
Posts: 15
Joined: Fri Nov 05, 2010 8:25 am

Post 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
nicolasVu
Posts: 15
Joined: Fri Nov 05, 2010 8:25 am

and Problem with Form in OpenEMM 6.2

Post 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
nicolasVu
Posts: 15
Joined: Fri Nov 05, 2010 8:25 am

Post by nicolasVu »

Nobody can help me? :(
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post 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.
OpenEMM Maintainer
Post Reply