473,594 Members | 2,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with calling .Net Web Service. XML provided. Anyone help?

Hi,

I'm hoping that someone will be able to help out with a problem we are
having. We have a web service built in .Net 1.1. We are trying to
call it from PHP4 using the NuSOAP add on. It seems the SOAP it is
sending as the request isn't what the web service is looking for.

Here is what my PHP4 NuSOAP client is sending:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd"
xmlns:tns="http s://mysite.com/mydir/WebService/">
<SOAP-ENV:Body>
<MyFunction xsi:type="xsd:s tring">08</MyFunction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Here is what my .Net 1.1 web service expects the request to look like:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:tns="http s://mysite.com/mydir/WebService/"
xmlns:types="ht tps://mysite.com/mydir/WebService/encodedTypes"
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/">
<soap:Body soap:encodingSt yle="http://schemas.xmlsoap .org/soap/encoding/">
<tns:GetMessage >
<MyFunction xsi:type="xsd:s tring">08</MyFunction>
</tns:GetMessage>
</soap:Body>
</soap:Envelope>

On the request a SOAP fault is raised with the message:

<faultstring>Se rver was unable to read request. --&gt; There is an
error in XML document (1, 399). --&gt; &amp;lt;Merchan tResponse
xmlns=''&amp;gt ; was not expected.</faultstring>

Does anyone have any idea exactly which xmlns shouldn't be sent, or
what the problem is?

Many thanks,

Stewart
Nov 23 '05 #1
2 2702
Any takers?
wi************* *@yahoo.com.au (Stewart) wrote in message news:<3e******* *************** ****@posting.go ogle.com>...
Hi,

I'm hoping that someone will be able to help out with a problem we are
having. We have a web service built in .Net 1.1. We are trying to
call it from PHP4 using the NuSOAP add on. It seems the SOAP it is
sending as the request isn't what the web service is looking for.

Here is what my PHP4 NuSOAP client is sending:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd"
xmlns:tns="http s://mysite.com/mydir/WebService/">
<SOAP-ENV:Body>
<MyFunction xsi:type="xsd:s tring">08</MyFunction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Here is what my .Net 1.1 web service expects the request to look like:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:tns="http s://mysite.com/mydir/WebService/"
xmlns:types="ht tps://mysite.com/mydir/WebService/encodedTypes"
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/">
<soap:Body soap:encodingSt yle="http://schemas.xmlsoap .org/soap/encoding/">
<tns:GetMessage >
<MyFunction xsi:type="xsd:s tring">08</MyFunction>
</tns:GetMessage>
</soap:Body>
</soap:Envelope>

On the request a SOAP fault is raised with the message:

<faultstring>Se rver was unable to read request. --&gt; There is an
error in XML document (1, 399). --&gt; &amp;lt;Merchan tResponse
xmlns=''&amp;gt ; was not expected.</faultstring>

Does anyone have any idea exactly which xmlns shouldn't be sent, or
what the problem is?

Many thanks,

Stewart

Nov 23 '05 #2
DC
I can see that the request generated by PHP is not wrapping the <MyFunction>
element in a <GetMessage> element.

That looks to be the primary difference. That would account for the
rejection you are getting.

Does the nuSOAP generate stubs from WSDL ?

Also, look into WS-I BP1.0 compliant webservices, including using
document/literal. You appear to be using RPC/Encoded, which is not good for
interoperabilit y.

-D
"Stewart" <wi************ **@yahoo.com.au > wrote in message
news:3e******** *************** ***@posting.goo gle.com...
Any takers?
wi************* *@yahoo.com.au (Stewart) wrote in message
news:<3e******* *************** ****@posting.go ogle.com>...
Hi,

I'm hoping that someone will be able to help out with a problem we are
having. We have a web service built in .Net 1.1. We are trying to
call it from PHP4 using the NuSOAP add on. It seems the SOAP it is
sending as the request isn't what the web service is looking for.

Here is what my PHP4 NuSOAP client is sending:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd"
xmlns:tns="http s://mysite.com/mydir/WebService/">
<SOAP-ENV:Body>
<MyFunction xsi:type="xsd:s tring">08</MyFunction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Here is what my .Net 1.1 web service expects the request to look like:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:tns="http s://mysite.com/mydir/WebService/"
xmlns:types="ht tps://mysite.com/mydir/WebService/encodedTypes"
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/">
<soap:Body
soap:encodingSt yle="http://schemas.xmlsoap .org/soap/encoding/">
<tns:GetMessage >
<MyFunction xsi:type="xsd:s tring">08</MyFunction>
</tns:GetMessage>
</soap:Body>
</soap:Envelope>

On the request a SOAP fault is raised with the message:

<faultstring>Se rver was unable to read request. --&gt; There is an
error in XML document (1, 399). --&gt; &amp;lt;Merchan tResponse
xmlns=''&amp;gt ; was not expected.</faultstring>

Does anyone have any idea exactly which xmlns shouldn't be sent, or
what the problem is?

Many thanks,

Stewart

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
352
by: Stewart | last post by:
Hi, I'm hoping that someone will be able to help out with a problem we are having. We have a web service built in .Net 1.1. We are trying to call it from PHP4 using the NuSOAP add on. It seems the SOAP it is sending as the request isn't what the web service is looking for. Here is what my PHP4 NuSOAP client is sending: <?xml version="1.0" encoding="ISO-8859-1"?>
0
2580
by: Bob Davies | last post by:
Hi I have a webservice that retrieves data from a database, this is then returned to the calling client application built in windows forms within a dataset, however upon attempting to create tablestyles to format any of the columns within the datagrid, the exception "Can-not parent objects created on one thread to objects created on another" or words to that effect. I'm not too sure if what I said make sense, but i will add details to...
5
2590
by: joeblast | last post by:
I have a Web service that gets the financial periods and hold a reference to a disconnected dataset built at initialization. Web methods work on the dataset inside the web service. Everything is fine so far. My problem is that when I call a web method to modify the dataset inside the Web service it is never updated and I get no errors. currentPeriods method will always give me 1 even if I call ChangeDataset and call currentPeriods...
0
1430
by: softwareakash | last post by:
Hi All I am using cruise control for continuous integration with clearcase for this I am using 2 build files, One for cruise control and one for nant all this is done according to the documentation provided on cruisecontrol itself here is the content of my cruisecontrol build file ( which is watched
1
4626
by: dcnicholls | last post by:
This is my first post to this forum: I use ASP occasionally but don't know a lot of it, and the Windows IIS was invented by MS to torture me :) So I'm not sure if this should be herre or on the IIS area, but here goes: For the local mirror on my development PC of a site I've been managing for some years, I use the built in IIS (XP pro sp2) to act as a server for local web pages, and some of them use a little bit of simple ASP scripting. ...
12
4129
by: Simon | last post by:
Hi all, I'm having a baffling problem with a windows service that I'm working on. Basically, I am using a typed dataset to insert a large number of rows into an SQL Server 2005 database. But there's a memory leak that seems to be to do with calling the data adapters update method. It's making the memory usage go through the roof and ultimately the service crashes after running out of memory.
6
4581
by: Tomasz J | last post by:
Hello developers, I bind my TextBox control specyfying a format stored in my application global ApplicationContext object - it has a static string CurrencyFormat property. The problem - this works fine: Text='<%# Eval("Price", ApplicationContext.CurrencyFormat) %>'
5
1521
by: Peter | last post by:
I have a webpage which creates reports, a report can take few seconds or several minutes to create. This webpage calls a web service which in turn does a remoting call to a windows service and the service creates the report. My question is if a user cancels or closes the browser before the report is completed, but windows service is still in the process of creating a report how do I notify the service to quit creating a report because...
11
6055
by: SAL | last post by:
Hello, I have a Gridview control (.net 2.0) that I'm having trouble getting the Update button to fire any kind of event or preforming the update. The datatable is based on a join so I don't know if that's what's causing the behavior or not. It seems like the Update button should at least do something. When the Edit button is clicked, the grid goes into Edit mode and the Cancel button takes the grid out of Edit mode. So, I don't get what...
0
1729
by: BornTOCode | last post by:
Hello, I am attempting to call a (Delphi) win32 DLL from a Delphi.Net webservice. I am using a slightly modified version of the hello world webservice that comes with Delphi 2006. The DLL works fine when called from a win32 app. The problem I am encountering is that the string being returned to the caller is in Chinese (No, I'm not kidding). (I need it to be in English). Background: The DLL uses 3 pchar parms, 2 in and one out. In...
0
7947
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8255
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8010
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8242
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6665
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5413
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.