473,748 Members | 2,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SOAP Help

MR
I am in dire need of help in trying to get the client code for a web
service to work. i don't have a WSDL for the service so i created my own
ASP.NET service to test with. i converted the DTD files that i was given to
xsd files and used the xsd tool to create the classes. i used those classes
to create the parameters for the web method defined as follows:

[WebMethod]

publicSchema.su bmitOrderBatchR esponse
submitOrderBatc h(Schema.submit OrderBatch sob)

{

Schema.submitOr derBatchRespons e sbor = new
Schema.submitOr derBatchRespons e();

return sbor;
}

The proxy code is generated as:

[System.Diagnost ics.DebuggerSte pThroughAttribu te()]

[System.Componen tModel.Designer CategoryAttribu te("code")]

[System.Web.Serv ices.WebService BindingAttribut e(Name="OrderOp erationsSoap",
Namespace="http ://tempuri.org/")]

public class OrderOperations :
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol {
/// <remarks/>

public OrderOperations () {

this.Url = "http://localhost/Emulator/Emulator.asmx";

}
/// <remarks/>

[System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute("h ttp://tempuri.org/submitOrderBatc h",
RequestNamespac e="http://tempuri.org/",
ResponseNamespa ce="http://tempuri.org/",
Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal,
ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]

[return:
System.Xml.Seri alization.XmlEl ementAttribute( Namespace="http ://tempuri.org/submitOrderBatc hResponse.xs")]

public submitOrderBatc hResponse
submitOrderBatc h([System.Xml.Seri alization.XmlEl ementAttribute( Namespace="http ://tempuri.org/submitOrderBatc h.xs")]
submitOrderBatc h sob) {

object[] results = this.Invoke("su bmitOrderBatch" , new object[] {sob});

return ((submitOrderBa tchResponse)(re sults[0]));



my client code works on the local host but when i go out to the real
service it fails.

i created the client in VS.NET 2003 and am referencing the web service that
i created.

I compared the logs of what i am sending to what i am supposed to send and
the SOAP headers appear to be missing some info and some of the tags are
wrong:

This is what is being sent from the proxy

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"

xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http ://www.w3.org/2001/XMLSchema">

<soap:Body>

<submitOrderBat ch xmlns="urn:Orde rOperations">

<sob CustomerBatchID ="122" xmlns="http://tempuri.org/submitOrderBatc h.xs">

<Customer CustomerID="109 7" OrderSource="NV L TEST CUSTOMER (CUSTOMER)" />
<Orders> . . .

This is what i should be sending in the body

<ns1:submitOrde rBatch xmlns:ns1="urn: OrderOperations "

SOAP-ENV:encodingSty le="http://xml.apache.org/xml-soap/literalxml">

<orderBatchElem ent>

1) why does the first line show up? (?xml version ... etc.)

2) how can i get the correct SOAP headers?

3) how do i get the correct tags? ns1:submitOrder Batch
xmlns:ns1="urn: OrderOperations " instead of
xmlns="http://tempuri.org/submitOrderBatc h.xs">

thanks very much
Nov 17 '05 #1
1 1602
Hi MR,

Welcome to MSDN newsgroup.
Regarding on this issue, I've also found your another thread in the
microsoft.publi c.dotnet.framew ork.webservices
newsgroup. Another MSFT engineer has posted response there. Please feel
free to followup there if you have any further concerns or questions.
Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "MR" <co******@newsg roup.nospam>
| Subject: SOAP Help
| Date: Sun, 21 Aug 2005 01:29:21 +0300
| Lines: 122
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| Message-ID: <uz************ **@TK2MSFTNGP12 .phx.gbl>
| Newsgroups:
microsoft.publi c.dotnet.framew ork.webservices ,microsoft.publ ic.dotnet.langu a
ges.csharp
| NNTP-Posting-Host: hevron.biconix. com 62.90.12.234
| Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP12.phx. gbl
| Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.langua ges.csharp:1174 51
microsoft.publi c.dotnet.framew ork.webservices :7585
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| I am in dire need of help in trying to get the client code for a web
| service to work. i don't have a WSDL for the service so i created my own
| ASP.NET service to test with. i converted the DTD files that i was given
to
| xsd files and used the xsd tool to create the classes. i used those
classes
| to create the parameters for the web method defined as follows:
|
| [WebMethod]
|
| publicSchema.su bmitOrderBatchR esponse
| submitOrderBatc h(Schema.submit OrderBatch sob)
|
| {
|
| Schema.submitOr derBatchRespons e sbor = new
| Schema.submitOr derBatchRespons e();
|
| return sbor;
|
|
| }
|
| The proxy code is generated as:
|
| [System.Diagnost ics.DebuggerSte pThroughAttribu te()]
|
| [System.Componen tModel.Designer CategoryAttribu te("code")]
|
|
[System.Web.Serv ices.WebService BindingAttribut e(Name="OrderOp erationsSoap",
| Namespace="http ://tempuri.org/")]
|
| public class OrderOperations :
| System.Web.Serv ices.Protocols. SoapHttpClientP rotocol {
|
|
| /// <remarks/>
|
| public OrderOperations () {
|
| this.Url = "http://localhost/Emulator/Emulator.asmx";
|
| }
|
|
| /// <remarks/>
|
|
[System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute("h ttp://tempuri.o
rg/submitOrderBatc h",
| RequestNamespac e="http://tempuri.org/",
| ResponseNamespa ce="http://tempuri.org/",
| Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal,
| ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]
|
| [return:
|
System.Xml.Seri alization.XmlEl ementAttribute( Namespace="http ://tempuri.org/s
ubmitOrderBatch Response.xs")]
|
| public submitOrderBatc hResponse
|
submitOrderBatc h([System.Xml.Seri alization.XmlEl ementAttribute( Namespace="ht
tp://tempuri.org/submitOrderBatc h.xs")]
| submitOrderBatc h sob) {
|
| object[] results = this.Invoke("su bmitOrderBatch" , new object[] {sob});
|
| return ((submitOrderBa tchResponse)(re sults[0]));
|
|
|
|
|
|
|
| my client code works on the local host but when i go out to the real
| service it fails.
|
| i created the client in VS.NET 2003 and am referencing the web service
that
| i created.
|
| I compared the logs of what i am sending to what i am supposed to send
and
| the SOAP headers appear to be missing some info and some of the tags are
| wrong:
|
|
|
| This is what is being sent from the proxy
|
| <?xml version="1.0" encoding="utf-8"?>
|
| <soap:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
|
| xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
|
| xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
|
| <soap:Body>
|
| <submitOrderBat ch xmlns="urn:Orde rOperations">
|
| <sob CustomerBatchID ="122"
xmlns="http://tempuri.org/submitOrderBatc h.xs">
|
| <Customer CustomerID="109 7" OrderSource="NV L TEST CUSTOMER (CUSTOMER)" />
| <Orders> . . .
|
|
|
| This is what i should be sending in the body
|
| <ns1:submitOrde rBatch xmlns:ns1="urn: OrderOperations "
|
| SOAP-ENV:encodingSty le="http://xml.apache.org/xml-soap/literalxml">
|
| <orderBatchElem ent>
|
|
|
| 1) why does the first line show up? (?xml version ... etc.)
|
| 2) how can i get the correct SOAP headers?
|
| 3) how do i get the correct tags? ns1:submitOrder Batch
| xmlns:ns1="urn: OrderOperations " instead of
| xmlns="http://tempuri.org/submitOrderBatc h.xs">
|
| thanks very much
|
|
|

Nov 17 '05 #2

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

Similar topics

3
7245
by: junkmail | last post by:
on a win 2k server apparantly it is saying i dont have it. or it cant find it. im using mySQL 4.1 php 4.3.x apache 3.0.53 im new to php and am doing some tutorials, but when i run the sripts it tells mea it can not run pear/soap, because it can not be found.the book im learning form does not tell me how to install or configure this extension. so now im looking for help.
0
404
by: Leonid | last post by:
Thanks a lot for your time! Here is WSDL: <?xml version="1.0" encoding="utf-8"?>
3
9795
by: parrot toes | last post by:
Summary: I have been trying to make requests of a web service provided by Axis using a dotnet client with code generated by wsdl.exe and have been getting exceptions when trying to process the response. As a result of seraching news groups I guessed that the SOAP response defines an array element in a way that causes the dotnet deserialization routines to put the content in a generic object array (object) BUT the content is supposed to...
4
2266
by: Jonathan [sbrodolo] | last post by:
Hi there, I am using a LOTUS/DOMINO Web Service in my ASP.Net application and I am having quite a lot of problems. I have managed to solve most of them but this one it really is giving me terrible headaches. Web Service send's me back an XML that I have managed to read with an enormous quantity of problems (it sends me back an XML file with double XML declaration, not the real XML format). In case of server errors, DOMINO sends me back an...
16
3188
by: MR | last post by:
my soap messages to a remote site are failing. as far as i can tell the only differences between what my SOAP message looks liek and what they want are in the SOAP envelope SInce they don't have a wsdl doc i created a localhost site based on their DTD documetns. How do I configure my site (and client proxy) to match thier envelope? Any help would be greatly appreciated thanks
6
2133
by: A.M-SG | last post by:
Hi, We are developing a SmartClient application and we are planning to expose business objects layer to SmartClient application by using ASP.NET SOAP web services.
0
2138
by: Daniel | last post by:
Hi, I need help signing SOAP/XML. Have been stuck with this for a couple of days now. I get the following error message from the server: "The security token could not be authenticated or authorized." I am probably doing something wrong in the signing process. I use a tool called "Exchanger XML Professional 3.2" for canonicalization and sending the message. OpenSSL for SHA-1 hashing, RSA signing and Base 64 encoding.
0
5608
by: info | last post by:
Dear all, is the first time that I use SOAP, and i must say that i'm having several problems. this is SOAP message that expects the server =================XML EXPECTED FROM THE SERVER================ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
0
2203
by: Grzegorz Smith | last post by:
Hi All. I 'm learning ZSI to use SOAP and I desperately need help. I'm working on example from tutorial -(examples/server/send_response/ simple/wsdl/). Here are my wsdl files -http://pastebin.com/873488. I made wsdl2py wsdl2py --complexType --file=binding.wsdl and get Example_services.py and Example_Services_types.py. Here is the Example_services.py -http://pastebin.com/873492 and Example_Services_types.py -http://pastebin.com/873494 Now...
2
6770
by: furrypop | last post by:
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also definitely getting a hit when I use a browser to get to my hibye.cgi server (well, a blank page rather than a 404). However, when I run my hibye.pl client, I receive a 503 Service Unavailable at H:\scripts\hibye.pl line 25. It works when I...
0
9561
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...
0
9381
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9332
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
9254
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
8252
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
6799
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...
1
3316
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
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
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.