Solved

SOAP ERROR classic ASP

Posted on 2011-03-04
4
841 Views
Last Modified: 2012-05-11
i have ASP program that I am trying to get to pass XML to an APACHE java webservice.
I am getting an errors from the apex log.  
What do you this error means?  It seems like it might related to the structure of the envelope.  Any help is greatly appreciated


2011-03-04 15:05:12,004 WARN   [http-9080-10                       ] [LoggerListener:60] (   ) Authentication event AuthenticationSuccessEvent: n4api; details:
Authentication Details:   SessionType=  SessionTypeEnum[ws]
2011-03-04 15:05:12,005 WARN   [http-9080-10                       ] [LoggerListener:60] (   ) Authentication event AuthenticationSuccessEvent: n4api; details:
Authentication Details:   SessionType=  SessionTypeEnum[ws]
2011-03-04 15:05:12,123 WARN   [http-9080-10                       ] [GenericWebServiceMessageUtils:75] (   ) Problem with web service invocation: Error: No xml message has been defined!



SOAPParameters = 					"<submit-transaction xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">"
	SOAPParameters = SOAPParameters &   "<gate-id xsi:type=""xsd:string"">GCT GATE</gate-id>"
	SOAPParameters = SOAPParameters &   "<stage-id xsi:type=""xsd:string"">INSPECTOUT</stage-id>"
	SOAPParameters = SOAPParameters &   "<truck-visit gos-tv-key=""20390"" />"
	SOAPParameters = SOAPParameters &   "<truck-transaction tran-key=""9390129"" tran-nbr=""3307""><container tran-type=""DM"" /></truck-transaction></submit-transaction>"


    serviceUrl = "http://10.213.54.28:9080/apex/services/argoservice"
    Set oXmlHTTP = CreateObject("Microsoft.XMLHTTP")
    oXmlHTTP.Open "POST", serviceUrl, False

    oXmlHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
    oXmlHTTP.setRequestHeader "Authorization", "Basic " & Base64Encode("xxxx:xxxx")
    oXmlHTTP.setRequestHeader "SOAPAction","http://www.navis.com/services/argoservice"

    SOAPRequest = "<?xml version='1.0' encoding='utf-8'?>"
    SOAPRequest = SOAPRequest & "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:arg=""http://www.navis.com/services/argoservice"" xmlns:v1=""http://types.webservice.argo.navis.com/v1.0"">"
    SOAPRequest = SOAPRequest & "<soapenv:Header></soapenv:Header>"
    SOAPRequest = SOAPRequest & "<soapenv:Body>"
    SOAPRequest = SOAPRequest & "<arg:genericInvoke><arg:scopeCoordinateIdsWsType>"
    SOAPRequest = SOAPRequest & "<v1:operatorId>GCT</v1:operatorId>"
    SOAPRequest = SOAPRequest & "<v1:complexId>GCTUSA</v1:complexId>"
    SOAPRequest = SOAPRequest & "<v1:facilityId>BAYONNE</v1:facilityId>"
    SOAPRequest = SOAPRequest & "<v1:yardId>GLO</v1:yardId>"
    SOAPRequest = SOAPRequest & "</arg:scopeCoordinateIdsWsType>"
     SOAPRequest = SOAPRequest & "</arg:genericInvoke>"

    SOAPRequest = SOAPRequest & trim(SOAPParameters)

    SOAPRequest = SOAPRequest & "</soapenv:Body>"
    SOAPRequest = SOAPRequest & "</soapenv:Envelope>"
    oXmlHTTP.send SOAPRequest
    SOAPResponse = oXmlHTTP.responseXML.xml

Open in new window

0
Comment
Question by:globalterminal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 

Author Comment

by:globalterminal
ID: 35039700
i was debugging with SOAUPUI and here is some additional info.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server.userException</faultcode>
         <faultstring>org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.</faultstring>
         <detail>
            <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
      at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
      at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
      at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
      at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
      at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)
      at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
      at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
      at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
      at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:619)</ns1:stackTrace>
            <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">glt-ti2</ns2:hostname>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

0
 

Author Comment

by:globalterminal
ID: 35039833
if i change the <?xml statement to this:
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://types.webservice.argo.navis.com/v1.0">



now i get this error:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header>
      <soapenv:Upgrade soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
         <soapenv:SupportedEnvelope qname="soapenv:Envelope"/>
      </soapenv:Upgrade>
   </soapenv:Header>
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:VersionMismatch</faultcode>
         <faultstring>Version Mismatch</faultstring>
         <detail>
            <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">glt-ti2</ns1:hostname>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

0
 

Author Comment

by:globalterminal
ID: 35039928
ok...if use the following xml thru SOAPUI:

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:arg="http://www.navis.com/services/argobasicservice" xmlns:v1="http://types.webservice.argo.navis.com/v1.0">
<soapenv:Header></soapenv:Header><soapenv:Body>
<arg:genericInvoke><arg:scopeCoordinateIdsWsType>
<v1:operatorId>GCT</v1:operatorId><v1:complexId>GCTUSA</v1:complexId>
<v1:facilityId>BAYONNE</v1:facilityId><v1:yardId>GLO</v1:yardId>
</arg:scopeCoordinateIdsWsType></arg:genericInvoke>
<submit-transaction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<gate-id xsi:type="xsd:string">GCT GATE</gate-id><stage-id xsi:type="xsd:string">INSPECTOUT</stage-id>
<truck-visit gos-tv-key="20390" /><truck-transaction tran-key="9390129" tran-nbr="3307"><container tran-type="DM" />
</truck-transaction></submit-transaction></soapenv:Body></soapenv:Envelope>

i get a different error:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <genericInvokeResponse xmlns="http://www.navis.com/services/argobasicservice">
         <ns1:genericInvokeResponse xmlns:ns1="http://www.navis.com/services/argoservice">
            <ns2:commonResponse xmlns:ns2="http://types.webservice.argo.navis.com/v1.0">
               <ns2:Status>3</ns2:Status>
               <ns2:StatusDescription>Severe errors occurred, check message.</ns2:StatusDescription>
               <ns2:MessageCollector>
                  <ns2:Messages>
                     <ns2:Message>Error: No xml message has been defined!</ns2:Message>
                     <ns2:SeverityLevel>SEVERE</ns2:SeverityLevel>
                  </ns2:Messages>
               </ns2:MessageCollector>
            </ns2:commonResponse>
            <ns3:responsePayLoad xmlns:ns3="http://types.webservice.argo.navis.com/v1.0"><![CDATA[<update-status>
      <document-update status="REJECTED" >Error: No xml message has been defined!</document-update >
      <entity-updates amount-successful="0" amount-failed="0" amount-not-found="0">
                  </entity-updates>
      </update-status>]]></ns3:responsePayLoad>
         </ns1:genericInvokeResponse>
      </genericInvokeResponse>
   </soapenv:Body>
</soapenv:Envelope>



0
 
LVL 27

Accepted Solution

by:
BigRat earned 500 total points
ID: 35127965
The namespace for the SOAP Envelope is xmlns:soap="http://www.w3.org/2001/12/soap-envelope"

Why has yours got a trailing slash on it?
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question