473,394 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Errors communicating between C# client and Java (GLUE) webservice

Hi,

I seem to be having some problems connecting to webservices. I'm running a
C# client connected to a Java webservice using GLUE.

The difference between the two request and response pairs below is the first
contains one item in the request and the second contains two.

From what I can see, the only real difference between the two involves the
following:
<status>
<code>1</code>
<description>Added</description>
</status>
When I make a request with multiple items, the SOAP document that is
returned from GLUE does some optimization that seems to be causing problems
with the .NET deserializer.

If items in the document contain the exact same status, a reference is
inserted into the document:

<status href="#id3" soapenc:root="0"/>

and references the following later in the document:

<id3 id="id3"> <code>1</code>
<description>Added</description>

</id3>

When the document is deserialized, I get the following error (the class
ResponseState maps to 'status' in the XML document).
Message "Cannot assign object of type System.Xml.XmlNode[] to an object of
type Homebase.InventoryService.ResponseState."

StackTrace " at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.fixup_Read1_ListingUpdateResul t(Object
objFixup)\r\n at
System.Xml.Serialization.XmlSerializationReader.Do Fixups()\r\n at
System.Xml.Serialization.XmlSerializationReader.Re adReferencedElements()\r\n
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Read20_updateListingsResponse( )"
string

Assuming that this is the problem, is there a setting of some sort that I
can change to ensure that the document is process correctly? Can you see
another problem?

Thanks in advance,

Chris
*Valid Request*
=====================================
REQUEST:
=========================
<?xml version="1.0" encoding="UTF-8"?>
<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">
<SOAP-ENV:Body>
<ns1:updateListings
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="x">
<ns2:arg0
xmlns="http://www.webmethods.com/package/com.abe.bedrock.token/"
xmlns:ns2="http://www.webmethods.com/package/com.abe.bedrock.token/"
xsi:type="ns2:Token">
<applicationKey xmlns=""
xsi:type="xsd:string">HomeBase</applicationKey>
<userKey
xmlns=""
xsi:type="xsd:string">357B020720D925056E09375400F1 9BBD31408B05</userKey>
</ns2:arg0>

<arg1
SOAP-ENC:arrayType="ns3:BookListing[1]"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns3="http://www.webmethods.com/package/com.abe.bedrock.dto/"
xsi:type="SOAP-ENC:Array">
<i>
<author>JIMBob Whoever</author>
<binding>36</binding>
<edition>-1</edition>
<ISBN/>
<languageISOCode3>eng</languageISOCode3>

<printing>-1</printing>
<productType>1</productType>
<publisherCity>Hill</publisherCity>
<publisherCountry>CAN</publisherCountry>
<publisherName>Abe Books</publisherName>
<publisherYear>2005</publisherYear>

<title>SomeTitle</title>
<itemCondition>5</itemCondition>
<jacketCondition>-1</jacketCondition>
<price>19.99</price>
<quantity>1</quantity>
<quantityHeld>0</quantityHeld>

<quantityLimit>0</quantityLimit>
<shippingMultiplier>0</shippingMultiplier>
<signatureType>-1</signatureType>
<vendorCatalogID>0</vendorCatalogID>
<vendorListingID>1237877</vendorListingID>
</i>

</arg1>
</ns1:updateListings>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
RESPONSE:
===========================
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
xmlns:n2="http://www.webmethods.com/package/com.abe.bedrock.service.inventory.response/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <n:updateListingsResponse xmlns:n="x"> <Result> <responseMessage>Success</responseMessage> <timestamp>2006-01-30T21:45:11.090Z</timestamp> <resultMessages soapenc:arrayType="n2:ListingUpdateResult[1]"> <i> <lastUpdated>2006-01-30T21:45:11.164Z</lastUpdated> <listingID>592503601</listingID> <status> <code>1</code> <description>Added</description> </status> <vendorListingID>1237877</vendorListingID> </i> </resultMessages> </Result> </n:updateListingsResponse> </soap:Body></soap:Envelope>*Invalid Request*===================================== REQUEST:=========================<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelopexmlns: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"> <SOAP-ENV:Body> <ns1:updateListingsSOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"xmlns:ns1="x"> <ns2:arg0 xsi:type="ns2:Token"xmlns="http://www.webmethods.com/package/com.abe.bedrock.token/"xmlns:ns2="http://www.webmethods.com/package/com.abe.bedrock.token/"> <applicationKey xsi:type="xsd:string" xmlns="">HomeBase</applicationKey> <userKey xsi:type="xsd:string"xmlns="">357B020720D925056E09 375400F19BBD31408B05</userKey> </ns2:arg0> <arg1 xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns3:BookListing[2]"xmlns:ns3="http://www.webmethods.com/package/com.abe.bedrock.dto/"xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <i> <author>JIMBob Whoever</author> <binding>36</binding> <edition>-1</edition> <ISBN></ISBN> <languageISOCode3>eng</languageISOCode3> <printing>-1</printing> <productType>1</productType> <publisherCity>Hill</publisherCity> <publisherCountry>CAN</publisherCountry> <publisherName>Abe Books</publisherName> <publisherYear>2005</publisherYear> <title>SomeTitle</title> <itemCondition>5</itemCondition> <jacketCondition>-1</jacketCondition> <price>25.99</price> <quantity>1</quantity> <quantityHeld>0</quantityHeld> <quantityLimit>0</quantityLimit> <shippingMultiplier>0</shippingMultiplier> <signatureType>-1</signatureType> <vendorCatalogID>0</vendorCatalogID> <vendorListingID>1237898</vendorListingID> </i> <i> <author>Edgerton, Clyde</author> <binding>36</binding> <edition>-1</edition> <ISBN>094557553X</ISBN> <languageISOCode3>eng</languageISOCode3> <printing>-1</printing> <productType>1</productType> <publisherCity>Chapel Hill</publisherCity> <publisherCountry>USA</publisherCountry> <publisherName>Algonquin Books</publisherName> <publisherYear>1991</publisherYear> <title>Killer Diller</title> <itemCondition>5</itemCondition> <jacketCondition>-1</jacketCondition> <price>13.99</price> <quantity>1</quantity> <quantityHeld>0</quantityHeld> <quantityLimit>0</quantityLimit> <shippingMultiplier>0</shippingMultiplier> <signatureType>-1</signatureType> <vendorCatalogID>0</vendorCatalogID> <vendorListingID>1237897</vendorListingID> </i> </arg1> </ns1:updateListings> </SOAP-ENV:Body></SOAP-ENV:Envelope>RESPONSE:===========================< ?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:n2="http://www.webmethods.com/package/com.abe.bedrock.service.inventory.response/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <n:updateListingsResponse xmlns:n="x"> <Result> <responseMessage>Success</responseMessage> <timestamp>2006-01-30T21:37:59.585Z</timestamp> <resultMessages soapenc:arrayType="n2:ListingUpdateResult[2]"> <i> <lastUpdated>2006-01-30T21:38:01.775Z</lastUpdated> <listingID>592503598</listingID> <status href="#id3" soapenc:root="0"/> <vendorListingID>1237898</vendorListingID> </i> <i> <lastUpdated>2006-01-30T21:38:01.880Z</lastUpdated> <listingID>592503599</listingID> <status href="#id3"/> <vendorListingID>1237897</vendorListingID> </i> </resultMessages> </Result> </n:updateListingsResponse> <id3 id="id3"> <code>1</code> <description>Added</description> </id3> </soap:Body></soap:Envelope>

Feb 1 '06 #1
2 2013
Can you post WSDL ?

Feb 2 '06 #2
Thanks for the help guys,

It looks like our webservices team was able to find a workaround ... Our
ResponseState classes were created statically in the Java code. By not
making it static, it seems to have removed the optimization and solved our
problem. Is this the best solution?

I can still post the wsdl if need be ...
"Yury" <Yu**********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Can you post WSDL ?

Feb 2 '06 #3

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

Similar topics

12
by: Russ | last post by:
Hello. My new dev machine is running XP Pro. In the past all equipment has only used Windows 2000. I have had a lot of problems getting my projects up and running on the new machine. The current...
1
by: Kumar T via .NET 247 | last post by:
Could you please explain me the steps for consuming JavaWebservice through .NET client. I know how to connect through.NET webservice and I followed the same steps for this, but itdid not work out. ...
7
by: DW | last post by:
Hi, Here is my question. I want to push security prices to the desktop from the server. Whenever there is a new price in the database, the server notifies the client. How can this be done in...
1
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name...
7
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type...
7
by: Nalaka | last post by:
Hi, I created a sinple web service that returns a dataSet. Then I created a client program that uses this web service (that returns the Dataset). My question is, how did the client figure...
6
by: Sascha Schmidt | last post by:
Hi again! Well, the first part of my "mission" (calling remoting objects from a webservice) is solved. But there's another part: Calling this C#-Webservice from a java client. Is this a...
0
by: perschrotti | last post by:
I have simple .NET webservice coded in C# running on IIS 5 windows 2000 sp4 with .NET framework 1.1. I have a client coded in java with a webservice client stub generated by wsdl2java (axis). ...
0
by: Divyakumar Jain,SAP Netweaver consultant | last post by:
Hi all, I have created an web service on SAP system. I have created a .net client using Micrsoft Visual Studio 2003 and .net frame work 2.0. in Visual Basic. In that .net client i have created...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...

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.