473,795 Members | 3,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Interop with Apache SOAP

I have a web service writen by .NET:

[WebMethod]
[SoapRpcMethod]
public string[] Greetings(strin g[] names)
{
string[] gs = new string[names.Length];
for (int i = 0; i < gs.Length; i++)
gs[i] = string.Format(" Hello, {0}", names[i]);

return gs;
}

It will be consumed by a Apache SOAP client (SOAPConnect for Lotus
Notes). Apache can send the string array (names) to .NET; but fail to
deserialize the return array (GreetingsResul t).

Here is the web request (from Apache to .net)
<SOAP-ENV:Body>
<ns1:Greeting s xmlns:ns1="urn: ws-jlta-com"
SOAP-ENV:encodingSty le="http://schemas.xmlsoap .org/soap/encoding/">
<names xmlns:ns2="http ://schemas.xmlsoap .org/soap/encoding/"
xsi:type="ns2:A rray" ns2:arrayType=" xsd:string[2]">
<item xsi:type="xsd:s tring">biao</item>
<item xsi:type="xsd:s tring">yuan</item>
</names>
</ns1:Greetings>
</SOAP-ENV:Body>

This is the web response (from .net to Apache)
<soap:Body
soap:encodingSt yle="http://schemas.xmlsoap .org/soap/encoding/">
<types:Greeting sResponse>
<GreetingsResul t href="#id1" />
</types:Greetings Response>
<soapenc:Arra y id="id1" soapenc:arrayTy pe="xsd:string[2]">
<Item>Hello, biao</Item>
<Item>Hello, yuan</Item>
</soapenc:Array>
</soap:Body>

As Apache SOAP BeanSerializer only can accept camel casing properties.
So I guess the problem is caused by .net return <Item> which is pascal
casing.

I tested by using SoapFormatter to serialize string array, its result
is <item>, so I am quite confused why .net web serivce returns <Item>.

Any solution for this?

Thanks in advance.

Nov 23 '05 #1
7 2853
Look's like there is a bug in Apache that doesn't interpret what the web
servie wsdl is telling it.

Get the the Apache gurus to fix their software.
"Biao" <ta*******@gmai l.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I have a web service writen by .NET:

[WebMethod]
[SoapRpcMethod]
public string[] Greetings(strin g[] names)
{
string[] gs = new string[names.Length];
for (int i = 0; i < gs.Length; i++)
gs[i] = string.Format(" Hello, {0}", names[i]);

return gs;
}

It will be consumed by a Apache SOAP client (SOAPConnect for Lotus
Notes). Apache can send the string array (names) to .NET; but fail to
deserialize the return array (GreetingsResul t).

Here is the web request (from Apache to .net)
<SOAP-ENV:Body>
<ns1:Greeting s xmlns:ns1="urn: ws-jlta-com"
SOAP-ENV:encodingSty le="http://schemas.xmlsoap .org/soap/encoding/">
<names xmlns:ns2="http ://schemas.xmlsoap .org/soap/encoding/"
xsi:type="ns2:A rray" ns2:arrayType=" xsd:string[2]">
<item xsi:type="xsd:s tring">biao</item>
<item xsi:type="xsd:s tring">yuan</item>
</names>
</ns1:Greetings>
</SOAP-ENV:Body>

This is the web response (from .net to Apache)
<soap:Body
soap:encodingSt yle="http://schemas.xmlsoap .org/soap/encoding/">
<types:Greeting sResponse>
<GreetingsResul t href="#id1" />
</types:Greetings Response>
<soapenc:Arra y id="id1" soapenc:arrayTy pe="xsd:string[2]">
<Item>Hello, biao</Item>
<Item>Hello, yuan</Item>
</soapenc:Array>
</soap:Body>

As Apache SOAP BeanSerializer only can accept camel casing properties.
So I guess the problem is caused by .net return <Item> which is pascal
casing.

I tested by using SoapFormatter to serialize string array, its result
is <item>, so I am quite confused why .net web serivce returns <Item>.

Any solution for this?

Thanks in advance.

Nov 23 '05 #2
Thanks for your reply. Apache has a new project for web service (Axis).
But in my situation, Apache SOAP is the only choice. I have to find a
way to serialize soap message which can be accepted by it.

Nov 23 '05 #3
The point is that is the responsibility of the consumer to format the
request as the provider requires it and interpret the result that the
provider provides.

It is like a contract where the provider says:

- you are required to submit the request in the format specified in
appendix A

- the response will always be provided in the format specified in appendix
B

But, I can't really believe that Apache can't deal with a an <Item> node as
opposed to an <item> tag.

"Biao" <ta*******@gmai l.com> wrote in message
news:11******** *************@g 14g2000cwa.goog legroups.com...
Thanks for your reply. Apache has a new project for web service (Axis).
But in my situation, Apache SOAP is the only choice. I have to find a
way to serialize soap message which can be accepted by it.

Nov 23 '05 #4
The client application is on Lotus Notes(version 5), which has used for
several years. IBM gives a solution by using Apache SOAP for this
version of Lotus Notes. Our Lotus developer has very limited expertise
on web services, even on Java. So it is easier to do something in .NET
than Lotus Notes for the web service.

As Apache SOAP only supports encoding format. What I need is just an
equivalent of XmlArrayItemAtt ribute which can set the element name of
array item in literal format, such as SoapArrayItemAt tribute. I am
trying to do soap extension to solve this problem now. Any suggestion?

Nov 23 '05 #5
You're missing the point.

Your supplier for widgets supplies them in cardboard cartons.

Someone in your firm decides in thier infinite wisdom that you want them in
plastic bags.

Do you expect the widget supplier to redesign his packaging operation to
suit the abberations of someone in your firm.

No! You create a procedure to extract the widgets out of the cartons and put
them in plastic bags when they arrive at your place.

That is exactly what you need to do in this case. Take the data supplied by
the web service and massage it to suit your needs.

It's not the webservice's problem that your Lotus developer has very limited
expertise on web services.

What you are are advocating is the age old problem of someone saying "I'm
not going to change my end - you change your end" and you caving in instead
of sticking to your guns.

The proper response is to modify the consumer to deal with what it gets.
"Biao" <ta*******@gmai l.com> wrote in message
news:11******** **************@ l41g2000cwc.goo glegroups.com.. .
The client application is on Lotus Notes(version 5), which has used for
several years. IBM gives a solution by using Apache SOAP for this
version of Lotus Notes. Our Lotus developer has very limited expertise
on web services, even on Java. So it is easier to do something in .NET
than Lotus Notes for the web service.

As Apache SOAP only supports encoding format. What I need is just an
equivalent of XmlArrayItemAtt ribute which can set the element name of
array item in literal format, such as SoapArrayItemAt tribute. I am
trying to do soap extension to solve this problem now. Any suggestion?

Nov 23 '05 #6
Thanks for your reply. It looks like there will be some political
actions to take!

Nov 23 '05 #7
I worked it out. It is not a casing problem, but an interop issue
between Apache SOAP and Microsoft web service.

This can be soloved by adding an type mapping to SOAPMappingRegi stry,
and leave the java type null.

For detail pls see a post from Sanjiva Weerawarana
(http://marc.theaimsgroup.com/?l=soap...1982213396&w=2)

Nov 23 '05 #8

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

Similar topics

0
1491
by: bbalet.free.fr | last post by:
Hello, Anyone succeed to make work a .Net WebService client WSE with WSS4J (I always get the error message 'Signature Verification failed') ? On the server my WSDD config is: <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <globalConfiguration>
1
6610
by: bbalet.free.fr | last post by:
Hello, Anyone succeed to make work a .Net WebService client WSE with WSS4J (I always get the error message 'Signature Verification failed') ? On the server my WSDD config is: <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <globalConfiguration>
5
4164
by: vthakur | last post by:
Hello: I have a Axis Web Service that sets the sessionid in the SOAP header for persisting the session. The client is a .Net client that processes the header as an Unknown Header. It sets the session id received from the Service request on subsequent requests to the service. However the Axis Web service does not process the SOAP header received from the .Net client and creates a new session id for each request from the .Net client. Below...
2
6772
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
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10213
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
10163
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
10000
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
9037
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
7538
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
6779
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();...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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

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.