asp.net - Receive error: Cannot find declaration element 'ActivityId' -
this error beyond skill set apologize if make incorrect assumptions:
the activityid assigned when api call made client server, i'm assuming don't have control on how generated.
assuming don't have control on assignment of activitid problem being caused handshaking between iis server , endpoint?
is there modification can make in wsdl address problem?
i've posted trace events of call , code, please let me know else required troubleshoot problem.
below results found in trace viewer, further down code:
<e2etraceevent xmlns="http://schemas.microsoft.com/2004/06/e2etraceevent"> <system xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"> <eventid>0</eventid> <type>3</type> <subtype name="information">0</subtype> <level>8</level> <timecreated systemtime="2015-04-22t15:34:40.7214893z" /> <source name="system.servicemodel.messagelogging" /> <correlation activityid="{e7ac11ba-8f49-474d-8960-b9e3cf2da931}" /> <execution processname="iisexpress" processid="17112" threadid="8" /> <channel /> <computer>jrobinson6274</computer> </system> <applicationdata> <tracedata> <dataitem> <messagelogtracerecord time="2015-04-22t11:34:40.7214893-04:00" source="transportsend" type="system.servicemodel.dispatcher.operationformatter+operationformattermessage" xmlns="http://schemas.microsoft.com/2004/06/servicemodel/management/messagetrace"> <addressing> <action>http://dpd.com/common/service/shipmentservice/3.2/storeorders</action> <to>https://public-ws-stage.dpd.com/services/shipmentservice/v3_2/</to> </addressing> <httprequest> <method>post</method> <querystring></querystring> <webheaders> <vsdebuggercausalitydata>uidpoxicfr3bjxhagulezndhinsaaaaag4onpl7yhk6xmhxeb+x5ttt6sgl21b5cucon4nut0yeacqaa</vsdebuggercausalitydata> </webheaders> </httprequest> <s:envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:header> <h:authentication xmlns:h="http://dpd.com/common/service/types/authentication/2.0" xmlns="http://dpd.com/common/service/types/authentication/2.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <delisid xmlns="">######</delisid> <authtoken xmlns="">##################################</authtoken> <messagelanguage xmlns="">#####</messagelanguage> </h:authentication> <activityid correlationid="548239ec-6a8b-4628-8a8e-81141f15b3a0" xmlns="http://schemas.microsoft.com/2004/09/servicemodel/diagnostics">e7ac11ba-8f49-474d-8960-b9e3cf2da931</activityid> </s:header> <s:body xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <storeorders xmlns="http://dpd.com/common/service/types/shipmentservice/3.2"> <printoptions xmlns=""> <printerlanguage>pdf</printerlanguage> <paperformat>a6</paperformat> </printoptions> <order xmlns=""> <generalshipmentdata> <identificationnumber>12345</identificationnumber> <sendingdepot>0147</sendingdepot> <product>cl</product> <sender> <name1>######</name1> <street>#######</street> <country>de</country> <zipcode>#####</zipcode> <city>######</city> <customernumber>######</customernumber> </sender> <recipient> <name1>#######</name1> <street>#########</street> <country>####</country> <zipcode>40599</zipcode> <city>##########</city> </recipient> </generalshipmentdata> <parcels> <customerreferencenumber1>pds124400203</customerreferencenumber1> </parcels> <productandservicedata> <ordertype>consignment</ordertype> </productandservicedata> </order> </storeorders> </s:body> </s:envelope> </messagelogtracerecord> </dataitem> </tracedata> <system.diagnostics xmlns="http://schemas.microsoft.com/2004/08/system.diagnostics"> <logicaloperationstack></logicaloperationstack> <timestamp>990348428488</timestamp> <callstack> @ system.environment.getstacktrace(exception e, boolean needfileinfo) @ system.environment.get_stacktrace() @ system.diagnostics.traceeventcache.get_callstack() @ system.diagnostics.xmlwritertracelistener.writefooter(traceeventcache eventcache) @ system.diagnostics.xmlwritertracelistener.tracedata(traceeventcache eventcache, string source, traceeventtype eventtype, int32 id, object data) @ system.diagnostics.tracesource.tracedata(traceeventtype eventtype, int32 id, object data) @ system.servicemodel.diagnostics.messagelogger.loginternal(messageloggingsource source, object data) @ system.servicemodel.diagnostics.messagelogger.loginternal(messagelogtracerecord record) @ system.servicemodel.diagnostics.messagelogger.logmessageimpl(message& message, xmlreader reader, messageloggingsource source) @ system.servicemodel.diagnostics.messagelogger.logmessage(message& message, xmlreader reader, messageloggingsource source) @ system.servicemodel.channels.textmessageencoderfactory.textmessageencoder.writemessage(message message, int32 maxmessagesize, buffermanager buffermanager, int32 messageoffset) @ system.servicemodel.channels.httpoutput.serializebufferedmessage(message message, boolean shouldrecyclebuffer) @ system.servicemodel.channels.httpoutput.send(timespan timeout) @ system.servicemodel.channels.httpchannelfactory`1.httprequestchannel.httpchannelrequest.sendrequest(message message, timespan timeout) @ system.servicemodel.channels.requestchannel.request(message message, timespan timeout) @ system.servicemodel.dispatcher.requestchannelbinder.request(message message, timespan timeout) @ system.servicemodel.channels.servicechannel.call(string action, boolean oneway, proxyoperationruntime operation, object[] ins, object[] outs, timespan timeout) @ system.servicemodel.channels.servicechannelproxy.invokeservice(imethodcallmessage methodcall, proxyoperationruntime operation) @ system.servicemodel.channels.servicechannelproxy.invoke(imessage message) @ system.runtime.remoting.proxies.realproxy.privateinvoke(messagedata& msgdata, int32 type) @ dpdwebserviceshipment.shipmentservice_3_2.storeorders(storeordersrequest request) @ dpdwebserviceshipment.shipmentservice_3_2client.dpdwebserviceshipment.shipmentservice_3_2.storeorders(storeordersrequest request) in c:\users\jeffrey\appdata\local\temp\temporary asp.net files\vs\97aba582\bf0e7c3e\app_webreferences.lgiqd1ag.0.cs:line 3842 @ dpdwebserviceshipment.shipmentservice_3_2client.storeorders(authentication authentication, storeorders storeorders1) in c:\users\jeffrey\appdata\local\temp\temporary asp.net files\vs\97aba582\bf0e7c3e\app_webreferences.lgiqd1ag.0.cs:line 3849 @ dpdlabels.button1_click(object sender, eventargs e) in c:\pds_net\site\dpdlabels.aspx.cs:line 98 @ system.web.ui.webcontrols.button.onclick(eventargs e) @ system.web.ui.webcontrols.button.raisepostbackevent(string eventargument) @ system.web.ui.webcontrols.button.system.web.ui.ipostbackeventhandler.raisepostbackevent(string eventargument) @ system.web.ui.page.raisepostbackevent(ipostbackeventhandler sourcecontrol, string eventargument) @ system.web.ui.page.raisepostbackevent(namevaluecollection postdata) @ system.web.ui.page.processrequestmain(boolean includestagesbeforeasyncpoint, boolean includestagesafterasyncpoint) @ system.web.ui.page.processrequest(boolean includestagesbeforeasyncpoint, boolean includestagesafterasyncpoint) @ system.web.ui.page.processrequest() @ system.web.ui.page.processrequestwithnoassert(httpcontext context) @ system.web.ui.page.processrequest(httpcontext context) @ asp.dpdlabels_aspx.processrequest(httpcontext context) in c:\users\jeffrey\appdata\local\temp\temporary asp.net files\vs\97aba582\bf0e7c3e\app_web_e5verntf.0.cs:line 0 @ system.web.httpapplication.callhandlerexecutionstep.system.web.httpapplication.iexecutionstep.execute() @ system.web.httpapplication.executestep(iexecutionstep step, boolean& completedsynchronously) @ system.web.httpapplication.pipelinestepmanager.resumesteps(exception error) @ system.web.httpapplication.beginprocessrequestnotification(httpcontext context, asynccallback cb) @ system.web.httpruntime.processrequestnotificationprivate(iis7workerrequest wr, httpcontext context) @ system.web.hosting.pipelineruntime.processrequestnotificationhelper(intptr rootedobjectspointer, intptr nativerequestcontext, intptr moduledata, int32 flags) @ system.web.hosting.pipelineruntime.processrequestnotification(intptr rootedobjectspointer, intptr nativerequestcontext, intptr moduledata, int32 flags) @ system.web.hosting.unsafeiismethods.mgdindicatecompletion(intptr phandler, requestnotificationstatus& notificationstatus) @ system.web.hosting.pipelineruntime.processrequestnotificationhelper(intptr rootedobjectspointer, intptr nativerequestcontext, intptr moduledata, int32 flags) @ system.web.hosting.pipelineruntime.processrequestnotification(intptr rootedobjectspointer, intptr nativerequestcontext, intptr moduledata, int32 flags) </callstack> </system.diagnostics> </applicationdata> </e2etraceevent>
here code:
using dpdwebservicelogin; using dpdwebserviceshipment; public partial class dpdlabels : system.web.ui.page { protected void page_load(object sender, eventargs e) { } protected void button1_click(object sender, eventargs e) { loginserviceclient objlogin = new loginserviceclient(); var objauthtoken = objlogin.getauth("######", "######", "######"); label1.text = objauthtoken.authtoken.tostring(); shipmentservice_3_2client objshipment = new shipmentservice_3_2client(); var objauth = new authentication { delisid = "######", authtoken = objauthtoken.authtoken, messagelanguage = "#####", }; var objprinter = new printoptions { printerlanguage = printoptionsprinterlanguage.pdf, paperformat = printoptionspaperformat.a6, }; var objsenderaddress = new address { name1 = "iml gdn", street = "nurnberger straue 12", city = "dusseldorf", country = "de", zipcode = "40599", customernumber = "03180008", }; var objrecipientaddress = new address { name1 = "nikolas meyer", street = "nurnberger str 12", city = "dusseldorf", country = "de", zipcode = "40599", }; var objshipmentdata = new generalshipmentdata { identificationnumber = "12345", sendingdepot = "0147", product = generalshipmentdataproduct.cl, sender = objsenderaddress, recipient = objrecipientaddress, }; var objparcels = new parcel { customerreferencenumber1 = "pds124400203", }; var objproductservice = new productandservicedata { ordertype = productandservicedataordertype.consignment, }; var objshipmentservicedata = new shipmentservicedata { generalshipmentdata = objshipmentdata, parcels = new[] {objparcels}, productandservicedata = objproductservice, }; var objstoreorder = new storeorders { printoptions = objprinter, order = new[] { objshipmentservicedata }, }; storeordersresponse objshipmentresponse = new storeordersresponse(); **objshipmentresponse = objshipment.storeorders(objauth, objstoreorder);** here line produces error: cannot find declaration of element 'activityid' } }
hope helps else comes across error: cannot find declaration element 'activityid'. problem related activity tracing feature being turned on while making api calls java web services.
disabling activitytracing in web.config did trick. remove words activitytracing , set propagateactivity false:
<sources> <source name="system.servicemodel.messagelogging" switchvalue="verbose"> <listeners> <add type="system.diagnostics.defaulttracelistener" name="default"> <filter type="" /> </add> <add name="servicemodelmessagelogginglistener"> <filter type="" /> </add> </listeners> </source> <source name="system.servicemodel" switchvalue="verbose" propagateactivity="false"> <listeners> <add type="system.diagnostics.defaulttracelistener" name="default"> <filter type="" /> </add> <add name="servicemodeltracelistener"> <filter type="" /> </add> </listeners> </source> </sources>
Comments
Post a Comment