SoapException

D

Dan Diephouse

I have been developing a web service for use with the compact framework.
When I invoke it I get the following message:

An unhandled exception of type
'System.Web.Services.Protocols.SoapException' occurred in
System.Web.Services.dll

However, when I invoke the same service with the .NET desktop/server
edition, it works just fine.

I'm at a loss on what to do. The SOAPException doesn't provide me any
information about what went wrong. Its a wrapped/lit web service the
request/response both validate against the schema. I've attached the
request, response, wsdl, and stack trace. If anyone has any ideas, I
would greatly appreciate their input. Thanks,

- Dan Diephouse

Request:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<ScannerToken xmlns="http://dspec.com/dokku/2004/08">
<Username>admin</Username>
<Password>admin</Password>
</ScannerToken>
</soap:Header>
<soap:Body>
<GetNextLoads xmlns="http://dspec.com/dokku/2004/08">
<Loads>4</Loads>
</GetNextLoads>
</soap:Body></soap:Envelope>

Response:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<GetNextLoadsResponse xmlns="http://dspec.com/dokku/2004/08">
<DoorArray>
<Door>
<TripId>1</TripId>
<Name>1</Name>
<Status>To be loaded</Status>
<CutTime>0004-09-01T13:00:00.000Z</CutTime>
<Route>COL/ONT/LAX</Route>
</Door>
</DoorArray>
</GetNextLoadsResponse>
</soap:Body>
</soap:Envelope>

WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:tns="http://dspec.com/dokku/2004/08"
targetNamespace="http://dspec.com/dokku/2004/08">
<wsdl:types>
<xsd:schema targetNamespace="http://dspec.com/dokku/2004/08"
elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:element name="GetNextLoads">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Loads" type="xsd:int" minOccurs="1"
maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GetNextLoadsResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:DoorArray" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DoorArray">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:Door" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Door">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="TripId" nillable="true" type="xsd:long"/>
<xsd:element name="Name" nillable="true" type="xsd:string"/>
<xsd:element name="Status" nillable="true" type="xsd:string"/>
<xsd:element name="CutTime" nillable="true"
type="xsd:dateTime"/>
<xsd:element name="Route" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="GetNextLoadsRequest">
<wsdl:part name="parameters" element="tns:GetNextLoads"/>
</wsdl:message>
<wsdl:message name="GetNextLoadsResponse">
<wsdl:part name="parameters" element="tns:GetNextLoadsResponse"/>
</wsdl:message>
<wsdl:portType name="DokkuServicePortType">
<wsdl:blush:peration name="GetNextLoads">
<wsdl:input name="GetNextLoadsRequest"
message="tns:GetNextLoadsRequest"/>
<wsdl:blush:utput name="GetNextLoadsResponse"
message="tns:GetNextLoadsResponse"/>
</wsdl:blush:peration>
</wsdl:portType>
<wsdl:binding name="DokkuServiceBinding" type="tns:DokkuServicePortType">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:blush:peration name="GetNextLoads">
<wsdlsoap:blush:peration soapAction=""/>
<wsdl:input name="GetNextLoadsRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:blush:utput name="GetNextLoadsResponse">
<wsdlsoap:body use="literal"/>
</wsdl:blush:utput>
</wsdl:blush:peration>
</wsdl:binding>
<wsdl:service name="DokkuService">
<wsdl:port name="DokkuServicePort" binding="tns:DokkuServiceBinding">
<wsdlsoap:address
location="http://localhost:8080/wasabi/services/Dokku"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Stack trace:
System.Web.Services.dll!System.Web.Services.Protocols.SoapMessageParser.execute()
+ 0x19d bytes

System.Web.Services.dll!System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke(string
methodName = "GetNextLoads", System.Object[] parameters = {Length=1},
System.Web.Services.Protocols.WebClientAsyncResult asyncResult =
<undefined value>) + 0x38f bytes

System.Web.Services.dll!System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(string
methodName = "GetNextLoads", System.Object[] parameters = {Length=1})
+ 0x9 bytes
Dokku.exe!Dokku.WS.DokkuService.GetNextLoads(int Loads = 4) Line 42 +
0x1c bytes C#
Dokku.exe!Dokku.DokkuManager.GetNextLoads() Line 43 + 0x7 bytes C#
Dokku.exe!Dokku.FrmMain.Form1_Load(System.Object sender =
{Dokku.FrmMain}, System.EventArgs e = {System.EventArgs}) Line 657 +
0x6 bytes C#

System.Windows.Forms.dll!System.Windows.Forms.Form.OnLoad(System.EventArgs
e = {System.EventArgs}) + 0x15 bytes

System.Windows.Forms.dll!System.Windows.Forms.Form._SetVisibleNotify(bool
fVis = true) + 0x1d bytes

System.Windows.Forms.dll!System.Windows.Forms.Control.set_Visible(bool
value = true) + 0x1f bytes

OpenNETCF.Windows.Forms.dll!OpenNETCF.Windows.Forms.ApplicationEx.RunMessageLoop()
+ 0x12 bytes

OpenNETCF.Windows.Forms.dll!OpenNETCF.Windows.Forms.ApplicationEx.Run(System.Windows.Forms.Form
mainForm = {Dokku.FrmMain}) + 0x1d bytes
Dokku.exe!Dokku.FrmMain.Main() Line 628 C#
 
A

Alex Feinman [MVP]

Could be the date format, or something else. Try checking the InnerException
member of SOAPException. Also, if you email me with the URL, from which the
service is accessible, I could assist in troubleshooting

--
Alex Feinman
---
Visit http://www.opennetcf.org
Dan Diephouse said:
I have been developing a web service for use with the compact framework.
When I invoke it I get the following message:

An unhandled exception of type
'System.Web.Services.Protocols.SoapException' occurred in
System.Web.Services.dll

However, when I invoke the same service with the .NET desktop/server
edition, it works just fine.

I'm at a loss on what to do. The SOAPException doesn't provide me any
information about what went wrong. Its a wrapped/lit web service the
request/response both validate against the schema. I've attached the
request, response, wsdl, and stack trace. If anyone has any ideas, I
would greatly appreciate their input. Thanks,

- Dan Diephouse

Request:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<ScannerToken xmlns="http://dspec.com/dokku/2004/08">
<Username>admin</Username>
<Password>admin</Password>
</ScannerToken>
</soap:Header>
<soap:Body>
<GetNextLoads xmlns="http://dspec.com/dokku/2004/08">
<Loads>4</Loads>
</GetNextLoads>
</soap:Body></soap:Envelope>

Response:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<GetNextLoadsResponse xmlns="http://dspec.com/dokku/2004/08">
<DoorArray>
<Door>
<TripId>1</TripId>
<Name>1</Name>
<Status>To be loaded</Status>
<CutTime>0004-09-01T13:00:00.000Z</CutTime>
<Route>COL/ONT/LAX</Route>
</Door>
</DoorArray>
</GetNextLoadsResponse>
</soap:Body>
</soap:Envelope>

WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:tns="http://dspec.com/dokku/2004/08"
targetNamespace="http://dspec.com/dokku/2004/08">
<wsdl:types>
<xsd:schema targetNamespace="http://dspec.com/dokku/2004/08"
elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:element name="GetNextLoads">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Loads" type="xsd:int" minOccurs="1"
maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GetNextLoadsResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:DoorArray" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DoorArray">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:Door" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Door">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="TripId" nillable="true" type="xsd:long"/>
<xsd:element name="Name" nillable="true" type="xsd:string"/>
<xsd:element name="Status" nillable="true" type="xsd:string"/>
<xsd:element name="CutTime" nillable="true"
type="xsd:dateTime"/>
<xsd:element name="Route" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="GetNextLoadsRequest">
<wsdl:part name="parameters" element="tns:GetNextLoads"/>
</wsdl:message>
<wsdl:message name="GetNextLoadsResponse">
<wsdl:part name="parameters" element="tns:GetNextLoadsResponse"/>
</wsdl:message>
<wsdl:portType name="DokkuServicePortType">
<wsdl:blush:peration name="GetNextLoads">
<wsdl:input name="GetNextLoadsRequest"
message="tns:GetNextLoadsRequest"/>
<wsdl:blush:utput name="GetNextLoadsResponse"
message="tns:GetNextLoadsResponse"/>
</wsdl:blush:peration>
</wsdl:portType>
<wsdl:binding name="DokkuServiceBinding"
type="tns:DokkuServicePortType">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:blush:peration name="GetNextLoads">
<wsdlsoap:blush:peration soapAction=""/>
<wsdl:input name="GetNextLoadsRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:blush:utput name="GetNextLoadsResponse">
<wsdlsoap:body use="literal"/>
</wsdl:blush:utput>
</wsdl:blush:peration>
</wsdl:binding>
<wsdl:service name="DokkuService">
<wsdl:port name="DokkuServicePort" binding="tns:DokkuServiceBinding">
<wsdlsoap:address
location="http://localhost:8080/wasabi/services/Dokku"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Stack trace:
System.Web.Services.dll!System.Web.Services.Protocols.SoapMessageParser.execute()
+ 0x19d bytes
System.Web.Services.dll!System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke(string
methodName = "GetNextLoads", System.Object[] parameters = {Length=1},
System.Web.Services.Protocols.WebClientAsyncResult asyncResult =
<undefined value>) + 0x38f bytes
System.Web.Services.dll!System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(string
methodName = "GetNextLoads", System.Object[] parameters = {Length=1}) +
0x9 bytes
Dokku.exe!Dokku.WS.DokkuService.GetNextLoads(int Loads = 4) Line 42 +
0x1c bytes C#
Dokku.exe!Dokku.DokkuManager.GetNextLoads() Line 43 + 0x7 bytes C#
Dokku.exe!Dokku.FrmMain.Form1_Load(System.Object sender =
{Dokku.FrmMain}, System.EventArgs e = {System.EventArgs}) Line 657 + 0x6
bytes C#

System.Windows.Forms.dll!System.Windows.Forms.Form.OnLoad(System.EventArgs
e = {System.EventArgs}) + 0x15 bytes
System.Windows.Forms.dll!System.Windows.Forms.Form._SetVisibleNotify(bool
fVis = true) + 0x1d bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.set_Visible(bool
value = true) + 0x1f bytes
OpenNETCF.Windows.Forms.dll!OpenNETCF.Windows.Forms.ApplicationEx.RunMessageLoop()
+ 0x12 bytes
OpenNETCF.Windows.Forms.dll!OpenNETCF.Windows.Forms.ApplicationEx.Run(System.Windows.Forms.Form
mainForm = {Dokku.FrmMain}) + 0x1d bytes Dokku.exe!Dokku.FrmMain.Main()
Line 628 C#
 
D

Dan Diephouse

Alex said:
Could be the date format, or something else. Try checking the InnerException
member of SOAPException. Also, if you email me with the URL, from which the
service is accessible, I could assist in troubleshooting

The date validates even though I noticed that it says 0004 instead of
2004 - typo!. I changed it to 2004 and nothing changes.

The InnerException was blank and the Message is just "SoapException" -
kind of helpless. Here is a copy/paste from the exception printout.

The columns are Name, Value, Type:

$exception {System.Web.Services.Protocols.SoapException}
System.Web.Services.Protocols.SoapException
System.SystemException {"SoapException"} System.SystemException
System.Exception {"SoapException" } System.Exception
System.Object {System.Web.Services.Protocols.SoapException} System.Object
_innerException { } System.Exception
_message "SoapException" string
InnerException { } System.Exception
Message "SoapException" string

I've also attached an updated copy of the response with the http headers.

I will put this up on our server so you can access it. Thanks so much
for the help.

- Dan

Response:
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Date: Sun, 29 Aug 2004 19:24:12 GMT
Server: Jetty/4.2.17 (Windows XP/5.1 x86 java/1.4.2_04)
Content-Type: text/xml
Transfer-Encoding: chunked

19c

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body>
<GetNextLoadsResponse xmlns="http://dspec.com/dokku/2004/08">
<DoorArray>
<Door>
<TripId>1</TripId>
<Name>1</Name>
<Status>To be loaded</Status>
<CutTime>2004-09-01T12:00:00.000Z</CutTime>
<Route>COL/ONT/LAX</Route>
</Door>
</DoorArray>
</GetNextLoadsResponse>
</soap:Body>
</soap:Envelope>
0
 
A

Alex Feinman [MVP]

No, I was actually referring to T and Z in the date format. Desktop could be
okay with it, but the CF might have some trouble. Not necessarily so, but
worth checking
 
D

Dan Diephouse

Alex said:
No, I was actually referring to T and Z in the date format. Desktop could be
okay with it, but the CF might have some trouble. Not necessarily so, but
worth checking

I changed the date to this format and that didn't go either. Both
should be valid ISO8601 dateTime's from what I understand.

<CutTime>2004-09-01T12:00:00.000+00:00</CutTime>

Will email you connection info to the server. Thanks again.

- Dan
 
D

Dan Diephouse

Dan said:
I changed the date to this format and that didn't go either. Both
should be valid ISO8601 dateTime's from what I understand.

<CutTime>2004-09-01T12:00:00.000+00:00</CutTime>

Will email you connection info to the server. Thanks again.

- Dan

I tried (e-mail address removed) and (e-mail address removed).
Both addresses bounced. If you could email me your address or let me
know when your mail servers are online, that'd be great. Thanks,
- Dan
 
D

Dan Diephouse

I've spent some more time trying to debug this problem and haven't come
up with anything. The .NET CF supports doc/lit web services, right?

My wsdl, requests, and responses pass all the tests put forth by
SOAPScope and WS-I.

Is there anything else I can do to learn what the problem is? I just
know it has to be something ridiculous stupid now :)
- Dan
 
D

Dan Diephouse

Alex pointed out to me that CF SP2 fixes a bug with Headers and Web
services which is what was biting me. Thanks again Alex.
- Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top