Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SOAP request fails error 415

Status
Not open for further replies.

merrillsoft

Programmer
May 30, 2002
2
0
0
US
I am new to SOAP and have been supplied the following message to send as a test but I keep getting error 415 returned. Here is the test program

TEXT TO xmlout noshow
<?xml version="1.0" ?><S:Envelope xmlns:S=" xmlns=" xmlns:ns2=" version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;fluidAnalysisResults xmlns=&quot; Viscosity Appears To Be Low. Viscosity And Fuel Result Confirmed In Retest. Sample Form Indicates Oil/Filter Changed At Time Of Sampling. Results Reported Via Email.&lt;/recommendation&gt;&lt;sampleObtainedDate&gt;2010-02-26&lt;/sampleObtainedDate&gt;&lt;sampleTestedDate&gt;2010-03-02&lt;/sampleTestedDate&gt;&lt;hoursAtSample&gt;&lt;hoursOnFluid&gt;500&lt;/hoursOnFluid&gt;&lt;hoursOnMachine&gt;0&lt;/hoursOnMachine&gt;&lt;/hoursAtSample&gt;&lt;componentType&gt;E&lt;/componentType&gt;&lt;fluidBrand&gt;John Deere&lt;/fluidBrand&gt;&lt;fluidType&gt;Plus-50&lt;/fluidType&gt;&lt;systemFuelType /&gt;&lt;sampleFrequency&gt;0&lt;/sampleFrequency&gt;&lt;/fluidSample&gt;&lt;variableTests&gt;&lt;name&gt;TBN&lt;/name&gt;&lt;value&gt;9.3&lt;/value&gt;&lt;/variableTests&gt;&lt;elementalData&gt;&lt;Ag_Silver&gt;1&lt;/Ag_Silver&gt;&lt;Al_Aluminum&gt;3&lt;/Al_Aluminum&gt;&lt;B_Boron&gt;84&lt;/B_Boron&gt;&lt;Ba_Barium&gt;1&lt;/Ba_Barium&gt;&lt;Ca_Calcium&gt;3455&lt;/Ca_Calcium&gt;&lt;Cr_Chromium&gt;2&lt;/Cr_Chromium&gt;&lt;Cu_Copper&gt;10&lt;/Cu_Copper&gt;&lt;Fe_Iron&gt;50&lt;/Fe_Iron&gt;&lt;K_Potassium&gt;5&lt;/K_Potassium&gt;&lt;Mg_Magnesium&gt;57&lt;/Mg_Magnesium&gt;&lt;Mn_Manganese&gt;2&lt;/Mn_Manganese&gt;&lt;Mo_Molybdenum&gt;97&lt;/Mo_Molybdenum&gt;&lt;Na_Sodium&gt;4&lt;/Na_Sodium&gt;&lt;Ni_Nickel&gt;1&lt;/Ni_Nickel&gt;&lt;P_Phosphorus&gt;1424&lt;/P_Phosphorus&gt;&lt;Pb_Lead&gt;3&lt;/Pb_Lead&gt;&lt;Si_Silicon&gt;5&lt;/Si_Silicon&gt;&lt;Sn_Tin&gt;1&lt;/Sn_Tin&gt;&lt;Ti_Titanium&gt;1&lt;/Ti_Titanium&gt;&lt;V_Vanadium&gt;1&lt;/V_Vanadium&gt;&lt;Zn_Zinc&gt;1919&lt;/Zn_Zinc&gt;&lt;/elementalData&gt;&lt;physicalProperties&gt;&lt;viscosity_40&gt;51.3&lt;/viscosity_40&gt;&lt;viscosity_100&gt;N/A&lt;/viscosity_100&gt;&lt;fuelDilution&gt;&amp;lt;1&lt;/fuelDilution&gt;&lt;waterPercentage&gt;0.05&lt;/waterPercentage&gt;&lt;solidsPercentage&gt;N/A&lt;/solidsPercentage&gt;&lt;glycol&gt;NO&lt;/glycol&gt;&lt;flashPoint /&gt;&lt;grade&gt;SAE 15W40&lt;/grade&gt;&lt;/physicalProperties&gt;&lt;particleCountData&gt;&lt;pc1&gt;173403&lt;/pc1&gt;&lt;pc2&gt;44057&lt;/pc2&gt;&lt;pc3&gt;876&lt;/pc3&gt;&lt;pc4&gt;132&lt;/pc4&gt;&lt;pc5&gt;0&lt;/pc5&gt;&lt;pcInfo&gt;&amp;gt;4; &amp;gt;6; &amp;gt;14; &amp;gt;23; &amp;gt;50NNNNN&lt;/pcInfo&gt;&lt;/particleCountData&gt;&lt;/fluidAnalysisData&gt;&lt;labInformation&gt;&lt;componentId&gt;6824398&lt;/componentId&gt;&lt;labYear&gt;2010&lt;/labYear&gt;&lt;deptNumber&gt;410&lt;/deptNumber&gt;&lt;labNo&gt;41010035036&lt;/labNo&gt;&lt;cno&gt;6177831&lt;/cno&gt;&lt;batchNumber&gt;2823&lt;/batchNumber&gt;&lt;analystId&gt;166&lt;/analystId&gt;&lt;ctcNumber&gt;1&lt;/ctcNumber&gt;&lt;/labInformation&gt;&lt;machineInformation&gt;&lt;make /&gt;&lt;model /&gt;&lt;pin&gt;DW724KX625796&lt;/pin&gt;&lt;/machineInformation&gt;&lt;contactInformation&gt;&lt;companyName&gt;NA_Murphy Tractor &amp;amp; Equipment&lt;/companyName&gt;&lt;contactLastName&gt;Savage&lt;/contactLastName&gt;&lt;contactFirstName&gt;Savage, Mark&lt;/contactFirstName&gt;&lt;address1 /&gt;&lt;address2 /&gt;&lt;city&gt;Omaha&lt;/city&gt;&lt;state&gt;NE&lt;/state&gt;&lt;zipCode&gt;68138&lt;/zipCode&gt;&lt;phone&gt;4028941899&lt;/phone&gt;&lt;fax&gt;4028918360&lt;/fax&gt;&lt;divisionNumber /&gt;&lt;unitDescription&gt;Diesel Engine&lt;/unitDescription&gt;&lt;serviceOrSerialNumber /&gt;&lt;parentNumber /&gt;&lt;endUser&gt;&lt;/endUser&gt;&lt;endLocation&gt;&lt;/endLocation&gt;&lt;/contactInformation&gt;&lt;/fluidAnalysisResult&gt;&lt;/fluidAnalysisResults&gt;</ns2:fluidAnalysisXML></ns2:processFluidAnalysisIP></S:Body></S:Envelope>
ENDTEXT

objh = CREATEOBJECT("Microsoft.XMLHTTP")
objh.OPEN("POST","objh.SEND (xmlout)

* wait for server to respond
DO WHILE objh.readyState <> 4
ENDDO


MESSAGEBOX(objh.responseText,16,"Return Message")
MESSAGEBOX(objh.STATUS,16,"Return Code")
 
First of all, tek-tips obviously does not show your code nicely, perhaps try TGML with a code block.

Besides that I see you do Soap very low level, you create the Soap XML yourself instead of using MSSOAP.SoapClient30.

The latter may not work with that web service, but it's worth a try. Go to Tools, Task Pane, then the XML Web Services Toolbar button and there try to register the XML Web Service.

Oh, and besides that you've given away username and password. Please ask Tek-Tips to edit/remove that.

Bye, Olaf.
 
The user and password are temporary on a test system not on production. Do you have any code samples that might get me in the right direction. We generate the data in an xml file just need to send it via SOAP. The host is less than helpful in trying to rectify. Thanks
 
If I login there with this test account I get to an overview of web services. You need a WSDL URL, that is given there as
That's the entry point for the webservices page of foxpros task pane (Regsiter XML Webservice) and in general the entry point to any webservice describing the service, it's methods and parameterization. The problem is that even the wsdl is password protected, but you can get the wsdl XML manually after login.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top