[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Server did not recognize the value of HTTP Header SOAPAction: .



Alvin,

There are lots of things I do not understand with your XML request message. 
I found the following WSDL file that hopefully is the right one:

    http://www.shipontrac.net/OnTracAPI/RateRequest.asmx?WSDL

First I do not understand what operation of the web service you are trying 
to call. I do not see any reference to "OnTracRateRequest" in the WSDL 
file. But since there is a "Rate_Request_XML" somewhere in your request I 
assume that you try to call operation "Rate_Request_XML" of port type 
"RateRequestSoap" of binding "RateRequestSoap" or "RateRequestSoap12".

Based on that assumption I am missing the proper SOAP action value which 
should be "www.shipontrac.net/Rate_Request_XML" for both bindings. Also 
notice the way soapUI specifies the SOAP action attribute as part of the 
"Content-Type" http header:

Content-Type: 
application/soap+xml;charset=UTF-8;action="www.shipontrac.net/RateAll_Request_XML"

Second you XML request is not well-formed. I had to disable the line right 
before the closing tag of the "Body" element to get a well-formed XML:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ship="www.shipontrac.net">
   <soapenv:Header/>
   <soapenv:Body>"www.shipontrac.net/ship:Rate_Request_XML"
     <ship:xmlIN>
       <OnTracRateRequest>
         <RequestReference>123456a</RequestReference>
         <account>**acct**</account>
         <password>**PW**</password>
         <package>
           <delzip>93711</delzip>
           <puzip>93030</puzip>
           <service>S</service>
           <COD>0</COD>
           <declared/>
           <type>p</type>
           <saturdayDel>false</saturdayDel>
           <weight>10</weight>
           <DIM>
             <length/>
             <width/>
             <height/>
           </DIM>
         </package>
       </OnTracRateRequest>
     </ship:xmlIN>
     <!-- disabled to get a well formed XML
   <www.shipontrac.net/ship:Rate_Request_XML>
   -->
   </soapenv:Body>
</soapenv:Envelope>

Furthermore I do not understand the

    "www.shipontrac.net/ship:Rate_Request_XML">

string right after the opening "Body" element. So perhaps a proper request 
is close to this one:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:ship="www.shipontrac.net">
   <soap:Header/>
   <soap:Body>
     <ship:RateAll_Request_XML>
       <ship:xmlIN>
           <RequestReference>123456a</RequestReference>
           <account>**acct**</account>
           <password>**PW**</password>
           <package>
             <delzip>93711</delzip>
             <puzip>93030</puzip>
             <service>S</service>
             <COD>0</COD>
             <declared/>
             <type>p</type>
             <saturdayDel>false</saturdayDel>
             <weight>10</weight>
             <DIM>
               <length/>
               <width/>
               <height/>
             </DIM>
           </package>
       </ship:xmlIN>
     </ship:RateAll_Request_XML>
   </soap:Body>
</soap:Envelope>


Regards,

Thomas.


Am 10.07.2010 14:01, schrieb Alvin Strasburger:
>
>     This is an attempt to submit a Rate Request for parcel shipping to
>     OnTrac (formerly California Overnite).  Attached is the debug file for
>     this attempt.  I have only masked the Account and Password.  Both the
>     URL and the Soap Message were copied directly from a successful
>     submission in SoapUI v3.5 yet our attempt returns this SOAPAction
>     error.
>
>
>     The OnTrac Manual states:
>
>     Requests are made using the HTTP Post method with the body of the
>     request being a wellformed XML document as described below, or via
>     SOAP as described in the WSDL available at the respective URL. The
>     input for the SOAP functions should be a string containing the same
>     XML formatted data as the HTTP Post method. The requests are to be
>     made to the provided URLS depending upon the type of request you wish
>     to make, and using a secure HTTPS connection is recommended, but is
>     not required. The XML in the requests are not case sensitive,
>
>
>     At first we tried a post.  After many failures, we received the
>     following reply from OnTrac Support and thus thought it might be
>     easier to use SOAP after receiving a successful reply from SoapUI.
>
>
>     The issue is probably that the page was initially designed for SOAP
>     and was just opened to posts by request.  So you kind of have to spoof
>     the URL a little in order to use the post.
>
>      For example in C#, the URL I post to is
>     ""[1]http://www.shipontrac.net/OnTracAPI/RateRequest.asmx/Rate_Request
>     ?""
>
>
>
>     And the string I post to it is
>
>     "xmlIN=" + the text of the xml
>
>
>
>     Our programmer is working on a more traditional page where you post
>     the content more directly, but that is still in development.
>
>
>
>      I hope someone can see what we are overlooking.
>
>
>     Alvin
>
> References
>
>     1. http://www.shipontrac.net/OnTracAPI/RateRequest.asmx/Rate_Request?
>
>
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------