Settings for Java Webservice (used by C++-Client)

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Settings for Java Webservice (used by C++-Client)

Falk Sippach
Hello,

I'm still trying to get running a Axis C++ client with a Axis Java
webservice. Disabling multirefs is working fine now. But I'm still have
problems.


For example is the type from string return values in some cases
soapenc:string (if I return a string array) instead of xsd:string (if I
return a single string). And in SoapDeSerializer.cpp the type is checked
only with URI_XSD and not URI_ENC. Therefore I get an empty string.

Which settings do I have to do at my Java webservice (message
style,...)? Are there more things to pay attention of? Is there a good
guide how to set up an Axis Java webservice with an Axis C++ client?

If I return integer values I do get an unhandled exception. Debugging
the AxisClient.dll has shown, that the delete of the member variable of
"Int" (Int intDeserializer) causes this. The delete happens in the stub
code (generated by WSDL2Ws), Int intDeserializer exists in
SoapDeSerializer.cpp.

Thanks for you help.

Falk.

Reply | Threaded
Open this post in threaded view
|

Re: Settings for Java Webservice (used by C++-Client)

Adrian Dick
See remarks below.
_______________________________________
Adrian Dick ([hidden email])


"Falk Sippach" <[hidden email]> wrote on 02/06/2005 10:45:01:

> Hello,
>
> I'm still trying to get running a Axis C++ client with a Axis Java
> webservice. Disabling multirefs is working fine now. But I'm still have
> problems.
>
>
> For example is the type from string return values in some cases
> soapenc:string (if I return a string array) instead of xsd:string (if I
> return a single string). And in SoapDeSerializer.cpp the type is checked
> only with URI_XSD and not URI_ENC. Therefore I get an empty string.
If you're building Axis C++ from source code, you could try applying this
patch (See attached file: SoapDeSerializer.cpp.patch), and seeing if this
resolves the problem.
Taking a skim through the SOAP 1.1 specification, I don't believe this is a
truly correct fix, as this URI_ENC appears to only be used for the String
type - as something to allow multi-ref support.

>
> If I return integer values I do get an unhandled exception. Debugging
> the AxisClient.dll has shown, that the delete of the member variable of
> "Int" (Int intDeserializer) causes this. The delete happens in the stub
> code (generated by WSDL2Ws), Int intDeserializer exists in
> SoapDeSerializer.cpp.

The serialization/deserialization of all the XSD simple types has just
(yesterday) been reworked, so you will hopefully find using the latest
nightly build resolves this problem.

SoapDeSerializer.cpp.patch (994 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Settings for Java Webservice (used by C++-Client)

Falk Sippach
In reply to this post by Falk Sippach
Hello,

I need some more help. Is there anybody who has successfully developed
an Axis C++ client calling a Java Webservice? At the moment it's not
working at all. Are there other products (C++), which work together with
Java Axis webservices?

I've read somewhere I should use doc/lit as message style. I've tried.
First I've generated a wsdl-file with java2wsdl. Then I've created the
server skeletons (wsdl2java) and the client stubs (wsdl2ws). But wsdl2ws
fails with a not reproducable error:

--------------------
java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
        at java.util.HashMap$ValueIterator.next(Unknown Source)
        at
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMe
thodInfo(Unknown Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
Source)

        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)

Code generation failed. Please see errors above.
--------------------

If I use rpc/lit, the stub code generation succeeds. But the soap
messages look like this:

--------------------
<getStringResponse>
        <getStringReturn>test string</getStringReturn>
</getStringResponse>
--------------------

There is no type definition and the client can't read any string.


It works, if I use rpc/encoded. But then I have the problem with URI_XSD
and URI_ENC (ok, I can fix it with the patch). And I can't get int
values or complex types with ints inside. It still doesn't work in the
1.6 alpha from June 1st, 3 a. m. Maybe in the next nightly build it will
work, because Adrian has changed it yesterday (after the last nightly
build?).

What may I do wrong? Please help.

Thanks,
Falk.
Reply | Threaded
Open this post in threaded view
|

RE: Settings for Java Webservice (used by C++-Client)

a.eriksson
In reply to this post by Falk Sippach

Hi Falk,

I have an Axis C++ client/Axis Java server using
rpc.

Corrected the following three things:

1) disable href/multiref on the server
2) slightly changing some code in AxisClient.dll
   SoapDeSerializer.cpp::getXSDType to allow
   soapenc:string
3) making sure the server doesn't return empty
   arrays (as AxisClient can't deserialize those)

Well, not very beautiful but it works.

/Anders

-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]]
Envoyé : jeudi 2 juin 2005 17:16
À : Apache AXIS C User List
Objet : Re: Settings for Java Webservice (used by C++-Client)


Hello,

I need some more help. Is there anybody who has successfully developed
an Axis C++ client calling a Java Webservice? At the moment it's not
working at all. Are there other products (C++), which work together with
Java Axis webservices?

I've read somewhere I should use doc/lit as message style. I've tried.
First I've generated a wsdl-file with java2wsdl. Then I've created the
server skeletons (wsdl2java) and the client stubs (wsdl2ws). But wsdl2ws
fails with a not reproducable error:

--------------------
java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
        at java.util.HashMap$ValueIterator.next(Unknown Source)
        at
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMe
thodInfo(Unknown Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
Source)

        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)

Code generation failed. Please see errors above.
--------------------

If I use rpc/lit, the stub code generation succeeds. But the soap
messages look like this:

--------------------
<getStringResponse>
        <getStringReturn>test string</getStringReturn>
</getStringResponse>
--------------------

There is no type definition and the client can't read any string.


It works, if I use rpc/encoded. But then I have the problem with URI_XSD
and URI_ENC (ok, I can fix it with the patch). And I can't get int
values or complex types with ints inside. It still doesn't work in the
1.6 alpha from June 1st, 3 a. m. Maybe in the next nightly build it will
work, because Adrian has changed it yesterday (after the last nightly
build?).

What may I do wrong? Please help.

Thanks,
Falk.
Reply | Threaded
Open this post in threaded view
|

Re: Settings for Java Webservice (used by C++-Client)

Adrian Dick
In reply to this post by Falk Sippach
Hi,

I, personally, don't work with the Axis Java web services - I use WebSphere
as my web service provider.  However, there are other developers in this
community who use axis java for their services.

You mention doc/literal messages, this is what I use, and is definitely
more thoroughly tested compared to rpc/encoded.
Note:  I see below that you're trying to use rpc/literal - this is not
currently supported by Axis C++, you will need to choose from doc/literal
or rpc/encoded.
Based on my experience with websphere, you would need to regenerate the
WSDL and redeploy the service to make this change (in addition to
re-generating the client stubs).

If you are able to post your WSDL to this mailing list we can look at why
your stubs are not being correctly generated, and hopefully someone in the
community more familiar with axis java will be able to diagnose any server
side issues.

Adrian
_______________________________________
Adrian Dick ([hidden email])


"Falk Sippach" <[hidden email]> wrote on 02/06/2005 16:16:24:

> Hello,
>
> I need some more help. Is there anybody who has successfully developed
> an Axis C++ client calling a Java Webservice? At the moment it's not
> working at all. Are there other products (C++), which work together with
> Java Axis webservices?
>
> I've read somewhere I should use doc/lit as message style. I've tried.
> First I've generated a wsdl-file with java2wsdl. Then I've created the
> server skeletons (wsdl2java) and the client stubs (wsdl2ws). But wsdl2ws
> fails with a not reproducable error:
>
> --------------------
> java.util.NoSuchElementException
>         at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
>         at java.util.HashMap$ValueIterator.next(Unknown Source)
>         at
> org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMe
> thodInfo(Unknown Source)
>         at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
> Source)
>         at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
> Source)
>         at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
> Source)
>
>         at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)
>
> Code generation failed. Please see errors above.
> --------------------
>
> If I use rpc/lit, the stub code generation succeeds. But the soap
> messages look like this:
>
> --------------------
> <getStringResponse>
>    <getStringReturn>test string</getStringReturn>
> </getStringResponse>
> --------------------
>
> There is no type definition and the client can't read any string.
>
>
> It works, if I use rpc/encoded. But then I have the problem with URI_XSD
> and URI_ENC (ok, I can fix it with the patch). And I can't get int
> values or complex types with ints inside. It still doesn't work in the
> 1.6 alpha from June 1st, 3 a. m. Maybe in the next nightly build it will
> work, because Adrian has changed it yesterday (after the last nightly
> build?).
>
> What may I do wrong? Please help.
>
> Thanks,
> Falk.

Reply | Threaded
Open this post in threaded view
|

AW: Settings for Java Webservice (used by C++-Client)

Falk Sippach
In reply to this post by Falk Sippach
Hello Anders,

thanks for providing your experiences. The first two steps I'm already using.

It would be nice if you can tell me a bit more. Do you generate the wsdl-file from a Java interface (java2wsdl) or do you write it by your own? If you use java2wsdl, which command line parameter do you use.

Can you send me a small example (Java interface and wsdl-file).

Thanks for your help,
Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Donnerstag, 2. Juni 2005 17:35
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)


Hi Falk,

I have an Axis C++ client/Axis Java server using rpc.

Corrected the following three things:

1) disable href/multiref on the server
2) slightly changing some code in AxisClient.dll
   SoapDeSerializer.cpp::getXSDType to allow
   soapenc:string
3) making sure the server doesn't return empty
   arrays (as AxisClient can't deserialize those)

Well, not very beautiful but it works.

/Anders

-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005 17:16 À : Apache AXIS C User List Objet : Re: Settings for Java Webservice (used by C++-Client)


Hello,

I need some more help. Is there anybody who has successfully developed an Axis C++ client calling a Java Webservice? At the moment it's not working at all. Are there other products (C++), which work together with Java Axis webservices?

I've read somewhere I should use doc/lit as message style. I've tried.
First I've generated a wsdl-file with java2wsdl. Then I've created the server skeletons (wsdl2java) and the client stubs (wsdl2ws). But wsdl2ws fails with a not reproducable error:

--------------------
java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
        at java.util.HashMap$ValueIterator.next(Unknown Source)
        at
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMe
thodInfo(Unknown Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
Source)

        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)

Code generation failed. Please see errors above.
--------------------

If I use rpc/lit, the stub code generation succeeds. But the soap messages look like this:

--------------------
<getStringResponse>
        <getStringReturn>test string</getStringReturn> </getStringResponse>
--------------------

There is no type definition and the client can't read any string.


It works, if I use rpc/encoded. But then I have the problem with URI_XSD and URI_ENC (ok, I can fix it with the patch). And I can't get int values or complex types with ints inside. It still doesn't work in the
1.6 alpha from June 1st, 3 a. m. Maybe in the next nightly build it will work, because Adrian has changed it yesterday (after the last nightly build?).

What may I do wrong? Please help.

Thanks,
Falk.
Reply | Threaded
Open this post in threaded view
|

AW: Settings for Java Webservice (used by C++-Client)

Falk Sippach
In reply to this post by Falk Sippach
Hello Adrian,

here are two wsdl-files, one for doc/lit and one for rpc/enc. They are both generated by java2wsdl:

..\project\..>java org.apache.axis.wsdl.Java2WSDL -l http://flak:8080/axis/services/SpServerWS -o ..\wsdl\SpServerWS.wsdl -n "urn:SpServerWS" -p"com.iez.spserver.ws" "urn:SpServerWS" -y document -u literal com.iez.spserver.ws.SpServerWS

Here are the java interface and the complex data types as well. I hope it's not to much. I don't have posted TestBean2 and SubBean2, because they are quite working well (contains only strings). The problems are in getInt, getInts, getTestBeans and getTestBean. And of course, I can't create client stubs using wsdl2ws.

Thanks for your help.
Falk.

-----Ursprüngliche Nachricht-----
Von: Adrian Dick [mailto:[hidden email]]
Gesendet: Donnerstag, 2. Juni 2005 18:07
An: Apache AXIS C User List
Betreff: Re: Settings for Java Webservice (used by C++-Client)

Hi,

I, personally, don't work with the Axis Java web services - I use WebSphere as my web service provider.  However, there are other developers in this community who use axis java for their services.

You mention doc/literal messages, this is what I use, and is definitely more thoroughly tested compared to rpc/encoded.
Note:  I see below that you're trying to use rpc/literal - this is not currently supported by Axis C++, you will need to choose from doc/literal or rpc/encoded.
Based on my experience with websphere, you would need to regenerate the WSDL and redeploy the service to make this change (in addition to re-generating the client stubs).

If you are able to post your WSDL to this mailing list we can look at why your stubs are not being correctly generated, and hopefully someone in the community more familiar with axis java will be able to diagnose any server side issues.

Adrian
_______________________________________
Adrian Dick ([hidden email])


"Falk Sippach" <[hidden email]> wrote on 02/06/2005 16:16:24:

> Hello,
>
> I need some more help. Is there anybody who has successfully developed
> an Axis C++ client calling a Java Webservice? At the moment it's not
> working at all. Are there other products (C++), which work together
> with Java Axis webservices?
>
> I've read somewhere I should use doc/lit as message style. I've tried.
> First I've generated a wsdl-file with java2wsdl. Then I've created the
> server skeletons (wsdl2java) and the client stubs (wsdl2ws). But
> wsdl2ws fails with a not reproducable error:
>
> --------------------
> java.util.NoSuchElementException
>         at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
>         at java.util.HashMap$ValueIterator.next(Unknown Source)
>         at
> org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMe
> thodInfo(Unknown Source)
>         at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
> Source)
>         at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
> Source)
>         at
> org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
> Source)
>
>         at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)
>
> Code generation failed. Please see errors above.
> --------------------
>
> If I use rpc/lit, the stub code generation succeeds. But the soap
> messages look like this:
>
> --------------------
> <getStringResponse>
>    <getStringReturn>test string</getStringReturn> </getStringResponse>
> --------------------
>
> There is no type definition and the client can't read any string.
>
>
> It works, if I use rpc/encoded. But then I have the problem with
> URI_XSD and URI_ENC (ok, I can fix it with the patch). And I can't get
> int values or complex types with ints inside. It still doesn't work in
> the
> 1.6 alpha from June 1st, 3 a. m. Maybe in the next nightly build it
> will work, because Adrian has changed it yesterday (after the last
> nightly build?).
>
> What may I do wrong? Please help.
>
> Thanks,
> Falk.


SpServerWS_rpc_enc.wsdl (14K) Download Attachment
SpServerWS_doc_lit.wsdl (12K) Download Attachment
SpServerWS.java (1K) Download Attachment
SubBean.java (572 bytes) Download Attachment
TestBean.java (962 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Settings for Java Webservice (used by C++-Client)

a.eriksson
In reply to this post by Falk Sippach
Hi,

I am not creating the wsdl file my self. However, I
believe that it was created with java2wsdl using some
standard arguments.

In fact, I did have some troubles with the wsdl file.
Under the tag <wsdl:binding, <wsdl:operation there is a
<wsdlsoap:operation tag. This tag had soapAction="" in
the file given to me and it should be
"WebserviceName#MethodName".

If this doesn't help, I could probably get some more
information about how the wsdl file was created.

/Anders


-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]]
Envoyé : jeudi 2 juin 2005 19:35
À : Apache AXIS C User List
Objet : AW: Settings for Java Webservice (used by C++-Client)


Hello Anders,

thanks for providing your experiences. The first two steps I'm already
using.

It would be nice if you can tell me a bit more. Do you generate the
wsdl-file from a Java interface (java2wsdl) or do you write it by your own?
If you use java2wsdl, which command line parameter do you use.

Can you send me a small example (Java interface and wsdl-file).

Thanks for your help,
Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Donnerstag, 2. Juni 2005 17:35
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)


Hi Falk,

I have an Axis C++ client/Axis Java server using rpc.

Corrected the following three things:

1) disable href/multiref on the server
2) slightly changing some code in AxisClient.dll
   SoapDeSerializer.cpp::getXSDType to allow
   soapenc:string
3) making sure the server doesn't return empty
   arrays (as AxisClient can't deserialize those)

Well, not very beautiful but it works.

/Anders

-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005
17:16 À : Apache AXIS C User List Objet : Re: Settings for Java Webservice
(used by C++-Client)


Hello,

I need some more help. Is there anybody who has successfully developed an
Axis C++ client calling a Java Webservice? At the moment it's not working at
all. Are there other products (C++), which work together with Java Axis
webservices?

I've read somewhere I should use doc/lit as message style. I've tried.
First I've generated a wsdl-file with java2wsdl. Then I've created the
server skeletons (wsdl2java) and the client stubs (wsdl2ws). But wsdl2ws
fails with a not reproducable error:

--------------------
java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
        at java.util.HashMap$ValueIterator.next(Unknown Source)
        at
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMe
thodInfo(Unknown Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
Source)

        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)

Code generation failed. Please see errors above.
--------------------

If I use rpc/lit, the stub code generation succeeds. But the soap messages
look like this:

--------------------
<getStringResponse>
        <getStringReturn>test string</getStringReturn> </getStringResponse>
--------------------

There is no type definition and the client can't read any string.


It works, if I use rpc/encoded. But then I have the problem with URI_XSD and
URI_ENC (ok, I can fix it with the patch). And I can't get int values or
complex types with ints inside. It still doesn't work in the
1.6 alpha from June 1st, 3 a. m. Maybe in the next nightly build it will
work, because Adrian has changed it yesterday (after the last nightly
build?).

What may I do wrong? Please help.

Thanks,
Falk.
Reply | Threaded
Open this post in threaded view
|

AW: Settings for Java Webservice (used by C++-Client)

Falk Sippach
In reply to this post by Falk Sippach
Hello Anders,

thanks for soapAction-tag hint. I set the java2wsdl flag: -A operation

java org.apache.axis.wsdl.Java2WSDL -l http://flak:8080/axis/services/Beantest -o ..\wsdl\Beantest.wsdl -n "urn:Beantest" -p"com.iez.spserver.ws.beantest" "urn:Beantest" -A operation -y rpc -u encoded com.iez.spserver.ws.beantest.BeantestWS

java2wsdl only writes the operation name (without "servicename#"), but it works better now for my getBean-Methods.

The generated client stubs are still buggy (Axis C++ 1.5 final). I had to comment out some "delete" (they try to free the pointer of int values). For example my getInt-Method has in stub BeantestWS a "delete Ret", which follows in an unhandled exception. I don't know why. But it's working without it.

Is somebody out there who has got similiar problems?

Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Freitag, 3. Juni 2005 09:21
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)

Hi,

I am not creating the wsdl file my self. However, I believe that it was created with java2wsdl using some standard arguments.

In fact, I did have some troubles with the wsdl file.
Under the tag <wsdl:binding, <wsdl:operation there is a <wsdlsoap:operation tag. This tag had soapAction="" in the file given to me and it should be "WebserviceName#MethodName".

If this doesn't help, I could probably get some more information about how the wsdl file was created.

/Anders


-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005 19:35 À : Apache AXIS C User List Objet : AW: Settings for Java Webservice (used by C++-Client)


Hello Anders,

thanks for providing your experiences. The first two steps I'm already using.

It would be nice if you can tell me a bit more. Do you generate the wsdl-file from a Java interface (java2wsdl) or do you write it by your own?
If you use java2wsdl, which command line parameter do you use.

Can you send me a small example (Java interface and wsdl-file).

Thanks for your help,
Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Donnerstag, 2. Juni 2005 17:35
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)


Hi Falk,

I have an Axis C++ client/Axis Java server using rpc.

Corrected the following three things:

1) disable href/multiref on the server
2) slightly changing some code in AxisClient.dll
   SoapDeSerializer.cpp::getXSDType to allow
   soapenc:string
3) making sure the server doesn't return empty
   arrays (as AxisClient can't deserialize those)

Well, not very beautiful but it works.

/Anders

-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005
17:16 À : Apache AXIS C User List Objet : Re: Settings for Java Webservice
(used by C++-Client)


Hello,

I need some more help. Is there anybody who has successfully developed an
Axis C++ client calling a Java Webservice? At the moment it's not working at
all. Are there other products (C++), which work together with Java Axis
webservices?

I've read somewhere I should use doc/lit as message style. I've tried.
First I've generated a wsdl-file with java2wsdl. Then I've created the
server skeletons (wsdl2java) and the client stubs (wsdl2ws). But wsdl2ws
fails with a not reproducable error:

--------------------
java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
        at java.util.HashMap$ValueIterator.next(Unknown Source)
        at
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMe
thodInfo(Unknown Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
Source)

        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)

Code generation failed. Please see errors above.
--------------------

If I use rpc/lit, the stub code generation succeeds. But the soap messages
look like this:

--------------------
<getStringResponse>
        <getStringReturn>test string</getStringReturn> </getStringResponse>
--------------------

There is no type definition and the client can't read any string.


It works, if I use rpc/encoded. But then I have the problem with URI_XSD and
URI_ENC (ok, I can fix it with the patch). And I can't get int values or
complex types with ints inside. It still doesn't work in the
1.6 alpha from June 1st, 3 a. m. Maybe in the next nightly build it will
work, because Adrian has changed it yesterday (after the last nightly
build?).

What may I do wrong? Please help.

Thanks,
Falk.
Reply | Threaded
Open this post in threaded view
|

RE: Settings for Java Webservice (used by C++-Client)

a.eriksson
In reply to this post by Falk Sippach

I had similar problems with this "delete". It was in the
debug version. Read somewhere that it is due to the fact
that the dlls used are compiled with different
debug-parameters which messes up the heap. Should be
ok in the release.

It works without but then it should be a memory leak.
In the case of returning complex types the delete is not
done and I guess that memory responsability is put
on the caller function. Not sure about this last note,
so someone please correct me if I'm wrong.

/Anders

-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]]
Envoyé : vendredi 3 juin 2005 11:52
À : Apache AXIS C User List
Objet : AW: Settings for Java Webservice (used by C++-Client)


Hello Anders,

thanks for soapAction-tag hint. I set the java2wsdl flag: -A operation

java org.apache.axis.wsdl.Java2WSDL -l
http://flak:8080/axis/services/Beantest -o ..\wsdl\Beantest.wsdl -n
"urn:Beantest" -p"com.iez.spserver.ws.beantest" "urn:Beantest" -A operation
-y rpc -u encoded com.iez.spserver.ws.beantest.BeantestWS

java2wsdl only writes the operation name (without "servicename#"), but it
works better now for my getBean-Methods.

The generated client stubs are still buggy (Axis C++ 1.5 final). I had to
comment out some "delete" (they try to free the pointer of int values). For
example my getInt-Method has in stub BeantestWS a "delete Ret", which
follows in an unhandled exception. I don't know why. But it's working
without it.

Is somebody out there who has got similiar problems?

Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Freitag, 3. Juni 2005 09:21
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)

Hi,

I am not creating the wsdl file my self. However, I believe that it was
created with java2wsdl using some standard arguments.

In fact, I did have some troubles with the wsdl file.
Under the tag <wsdl:binding, <wsdl:operation there is a <wsdlsoap:operation
tag. This tag had soapAction="" in the file given to me and it should be
"WebserviceName#MethodName".

If this doesn't help, I could probably get some more information about how
the wsdl file was created.

/Anders


-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005
19:35 À : Apache AXIS C User List Objet : AW: Settings for Java Webservice
(used by C++-Client)


Hello Anders,

thanks for providing your experiences. The first two steps I'm already
using.

It would be nice if you can tell me a bit more. Do you generate the
wsdl-file from a Java interface (java2wsdl) or do you write it by your own?
If you use java2wsdl, which command line parameter do you use.

Can you send me a small example (Java interface and wsdl-file).

Thanks for your help,
Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Donnerstag, 2. Juni 2005 17:35
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)


Hi Falk,

I have an Axis C++ client/Axis Java server using rpc.

Corrected the following three things:

1) disable href/multiref on the server
2) slightly changing some code in AxisClient.dll
   SoapDeSerializer.cpp::getXSDType to allow
   soapenc:string
3) making sure the server doesn't return empty
   arrays (as AxisClient can't deserialize those)

Well, not very beautiful but it works.

/Anders

-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005
17:16 À : Apache AXIS C User List Objet : Re: Settings for Java Webservice
(used by C++-Client)


Hello,

I need some more help. Is there anybody who has successfully developed an
Axis C++ client calling a Java Webservice? At the moment it's not working at
all. Are there other products (C++), which work together with Java Axis
webservices?

I've read somewhere I should use doc/lit as message style. I've tried.
First I've generated a wsdl-file with java2wsdl. Then I've created the
server skeletons (wsdl2java) and the client stubs (wsdl2ws). But wsdl2ws
fails with a not reproducable error:

--------------------
java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
        at java.util.HashMap$ValueIterator.next(Unknown Source)
        at
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMe
thodInfo(Unknown Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
Source)

        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)

Code generation failed. Please see errors above.
--------------------

If I use rpc/lit, the stub code generation succeeds. But the soap messages
look like this:

--------------------
<getStringResponse>
        <getStringReturn>test string</getStringReturn> </getStringResponse>
--------------------

There is no type definition and the client can't read any string.


It works, if I use rpc/encoded. But then I have the problem with URI_XSD and
URI_ENC (ok, I can fix it with the patch). And I can't get int values or
complex types with ints inside. It still doesn't work in the
1.6 alpha from June 1st, 3 a. m. Maybe in the next nightly build it will
work, because Adrian has changed it yesterday (after the last nightly
build?).

What may I do wrong? Please help.

Thanks,
Falk.
Reply | Threaded
Open this post in threaded view
|

AW: Settings for Java Webservice (used by C++-Client)

Falk Sippach
In reply to this post by Falk Sippach
Hi Anders,

another question: Have you ever tried to call you webservice methods with complex types (beans, arrays of beans)? The parameter serialization is not really working. Do you have any hints.

Thanks,
Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Freitag, 3. Juni 2005 09:21
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)

Hi,

I am not creating the wsdl file my self. However, I believe that it was created with java2wsdl using some standard arguments.

In fact, I did have some troubles with the wsdl file.
Under the tag <wsdl:binding, <wsdl:operation there is a <wsdlsoap:operation tag. This tag had soapAction="" in the file given to me and it should be "WebserviceName#MethodName".

If this doesn't help, I could probably get some more information about how the wsdl file was created.

/Anders


-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005 19:35 À : Apache AXIS C User List Objet : AW: Settings for Java Webservice (used by C++-Client)


Hello Anders,

thanks for providing your experiences. The first two steps I'm already using.

It would be nice if you can tell me a bit more. Do you generate the wsdl-file from a Java interface (java2wsdl) or do you write it by your own?
If you use java2wsdl, which command line parameter do you use.

Can you send me a small example (Java interface and wsdl-file).

Thanks for your help,
Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Donnerstag, 2. Juni 2005 17:35
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)


Hi Falk,

I have an Axis C++ client/Axis Java server using rpc.

Corrected the following three things:

1) disable href/multiref on the server
2) slightly changing some code in AxisClient.dll
   SoapDeSerializer.cpp::getXSDType to allow
   soapenc:string
3) making sure the server doesn't return empty
   arrays (as AxisClient can't deserialize those)

Well, not very beautiful but it works.

/Anders

-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005
17:16 À : Apache AXIS C User List Objet : Re: Settings for Java Webservice
(used by C++-Client)


Hello,

I need some more help. Is there anybody who has successfully developed an
Axis C++ client calling a Java Webservice? At the moment it's not working at
all. Are there other products (C++), which work together with Java Axis
webservices?

I've read somewhere I should use doc/lit as message style. I've tried.
First I've generated a wsdl-file with java2wsdl. Then I've created the
server skeletons (wsdl2java) and the client stubs (wsdl2ws). But wsdl2ws
fails with a not reproducable error:

--------------------
java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
        at java.util.HashMap$ValueIterator.next(Unknown Source)
        at
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMe
thodInfo(Unknown Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
Source)

        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)

Code generation failed. Please see errors above.
--------------------

If I use rpc/lit, the stub code generation succeeds. But the soap messages
look like this:

--------------------
<getStringResponse>
        <getStringReturn>test string</getStringReturn> </getStringResponse>
--------------------

There is no type definition and the client can't read any string.


It works, if I use rpc/encoded. But then I have the problem with URI_XSD and
URI_ENC (ok, I can fix it with the patch). And I can't get int values or
complex types with ints inside. It still doesn't work in the
1.6 alpha from June 1st, 3 a. m. Maybe in the next nightly build it will
work, because Adrian has changed it yesterday (after the last nightly
build?).

What may I do wrong? Please help.

Thanks,
Falk.
Reply | Threaded
Open this post in threaded view
|

RE: Settings for Java Webservice (used by C++-Client)

a.eriksson
In reply to this post by Falk Sippach

No, never tried with beans straight off. I've used
complex types (objects) with string members and arrays
containing objects with strings.

Well, as I don't have direct insight in the java side
I don't really know if it's beans or not.

I also use axis in the other way, java clients
connecting to my C++ sever. In that case I specify my
complex types (again objects containing string members)
directly in a wsdl file...


/Anders


-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]]
Envoyé : vendredi 3 juin 2005 13:32
À : Apache AXIS C User List
Objet : AW: Settings for Java Webservice (used by C++-Client)


Hi Anders,

another question: Have you ever tried to call you webservice methods with
complex types (beans, arrays of beans)? The parameter serialization is not
really working. Do you have any hints.

Thanks,
Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Freitag, 3. Juni 2005 09:21
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)

Hi,

I am not creating the wsdl file my self. However, I believe that it was
created with java2wsdl using some standard arguments.

In fact, I did have some troubles with the wsdl file.
Under the tag <wsdl:binding, <wsdl:operation there is a <wsdlsoap:operation
tag. This tag had soapAction="" in the file given to me and it should be
"WebserviceName#MethodName".

If this doesn't help, I could probably get some more information about how
the wsdl file was created.

/Anders


-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005
19:35 À : Apache AXIS C User List Objet : AW: Settings for Java Webservice
(used by C++-Client)


Hello Anders,

thanks for providing your experiences. The first two steps I'm already
using.

It would be nice if you can tell me a bit more. Do you generate the
wsdl-file from a Java interface (java2wsdl) or do you write it by your own?
If you use java2wsdl, which command line parameter do you use.

Can you send me a small example (Java interface and wsdl-file).

Thanks for your help,
Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Donnerstag, 2. Juni 2005 17:35
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)


Hi Falk,

I have an Axis C++ client/Axis Java server using rpc.

Corrected the following three things:

1) disable href/multiref on the server
2) slightly changing some code in AxisClient.dll
   SoapDeSerializer.cpp::getXSDType to allow
   soapenc:string
3) making sure the server doesn't return empty
   arrays (as AxisClient can't deserialize those)

Well, not very beautiful but it works.

/Anders

-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005
17:16 À : Apache AXIS C User List Objet : Re: Settings for Java Webservice
(used by C++-Client)


Hello,

I need some more help. Is there anybody who has successfully developed an
Axis C++ client calling a Java Webservice? At the moment it's not working at
all. Are there other products (C++), which work together with Java Axis
webservices?

I've read somewhere I should use doc/lit as message style. I've tried.
First I've generated a wsdl-file with java2wsdl. Then I've created the
server skeletons (wsdl2java) and the client stubs (wsdl2ws). But wsdl2ws
fails with a not reproducable error:

--------------------
java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
        at java.util.HashMap$ValueIterator.next(Unknown Source)
        at
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMe
thodInfo(Unknown Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
Source)

        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)

Code generation failed. Please see errors above.
--------------------

If I use rpc/lit, the stub code generation succeeds. But the soap messages
look like this:

--------------------
<getStringResponse>
        <getStringReturn>test string</getStringReturn> </getStringResponse>
--------------------

There is no type definition and the client can't read any string.


It works, if I use rpc/encoded. But then I have the problem with URI_XSD and
URI_ENC (ok, I can fix it with the patch). And I can't get int values or
complex types with ints inside. It still doesn't work in the
1.6 alpha from June 1st, 3 a. m. Maybe in the next nightly build it will
work, because Adrian has changed it yesterday (after the last nightly
build?).

What may I do wrong? Please help.

Thanks,
Falk.
Reply | Threaded
Open this post in threaded view
|

AW: Settings for Java Webservice (used by C++-Client)

Falk Sippach
In reply to this post by Falk Sippach
Hi Anders,

Which kind of complex types do you have?

My complex object looks as follows:
class object
{
        int id;
        String name;
        String uuid;
        objecttype type;
        attribute[] atts;
}

objecttype and attribute are other complex types.

Here is it as a return object, created by Axis Java (rpc/enc):

<getObjectReturn xsi:type="ns1:IEZObject">
  <attributes xsi:type="ns1:IEZAttribute"></attributes>  
  .. 10 times
  <attributes xsi:type="ns1:IEZAttribute"></attributes>
  <id xsi:type="xsd:int">1</id>
  <name xsi:type="soapenc:string">Testobjekt1</name>
  <type xsi:type="ns1:IEZObjectType">
    <description xsi:type="soapenc:string">Beschreibung zu Objekttyp1</description>
    <id xsi:type="xsd:int">1</id>
    <name xsi:type="soapenc:string">Objekttyp1</name>
  </type>
  <uuid xsi:type="soapenc:string">uuid-34234-23423</uuid>
</getObjectReturn>

<attributes> looks as follows:

<attributes xsi:type="ns1:IEZAttribute">
  <id xsi:type="xsd:int">1</id>
  <type xsi:type="ns1:IEZAttributeType">
    <dataType xsi:type="xsd:int">1</dataType>
    <description xsi:type="soapenc:string">Beschreibung zu Attributtyp2</description>
    <enumeration xsi:type="soapenc:string" xsi:nil="true"/>
    <id xsi:type="xsd:int">2</id>
    <name xsi:type="soapenc:string">Attributtyp2</name>
    <range xsi:type="soapenc:string" xsi:nil="true"/>
    <step xsi:type="soapenc:string" xsi:nil="true"/>
    <unit xsi:type="soapenc:string" xsi:nil="true"/>
  </type>
  <uuid xsi:type="soapenc:string">uuid-123123-123123-123</uuid>
  <value xsi:type="soapenc:string">Wert 2</value>
</attributes>

Isn't it strange, that the attributes array isn't wrapped as array. The soapdeserializer try to read the id (of object) first, but he finds the first attribute element. Is this complex type to complex? What should I do?

Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Freitag, 3. Juni 2005 14:21
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)


No, never tried with beans straight off. I've used complex types (objects) with string members and arrays containing objects with strings.

Well, as I don't have direct insight in the java side I don't really know if it's beans or not.

I also use axis in the other way, java clients connecting to my C++ sever. In that case I specify my complex types (again objects containing string members) directly in a wsdl file...


/Anders


-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : vendredi 3 juin 2005 13:32 À : Apache AXIS C User List Objet : AW: Settings for Java Webservice (used by C++-Client)


Hi Anders,

another question: Have you ever tried to call you webservice methods with complex types (beans, arrays of beans)? The parameter serialization is not really working. Do you have any hints.

Thanks,
Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Freitag, 3. Juni 2005 09:21
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)

Hi,

I am not creating the wsdl file my self. However, I believe that it was created with java2wsdl using some standard arguments.

In fact, I did have some troubles with the wsdl file.
Under the tag <wsdl:binding, <wsdl:operation there is a <wsdlsoap:operation tag. This tag had soapAction="" in the file given to me and it should be "WebserviceName#MethodName".

If this doesn't help, I could probably get some more information about how the wsdl file was created.

/Anders


-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005
19:35 À : Apache AXIS C User List Objet : AW: Settings for Java Webservice (used by C++-Client)


Hello Anders,

thanks for providing your experiences. The first two steps I'm already using.

It would be nice if you can tell me a bit more. Do you generate the wsdl-file from a Java interface (java2wsdl) or do you write it by your own?
If you use java2wsdl, which command line parameter do you use.

Can you send me a small example (Java interface and wsdl-file).

Thanks for your help,
Falk.

-----Ursprüngliche Nachricht-----
Von: Anders Eriksson [mailto:[hidden email]]
Gesendet: Donnerstag, 2. Juni 2005 17:35
An: Apache AXIS C User List
Betreff: RE: Settings for Java Webservice (used by C++-Client)


Hi Falk,

I have an Axis C++ client/Axis Java server using rpc.

Corrected the following three things:

1) disable href/multiref on the server
2) slightly changing some code in AxisClient.dll
   SoapDeSerializer.cpp::getXSDType to allow
   soapenc:string
3) making sure the server doesn't return empty
   arrays (as AxisClient can't deserialize those)

Well, not very beautiful but it works.

/Anders

-----Message d'origine-----
De : Falk Sippach [mailto:[hidden email]] Envoyé : jeudi 2 juin 2005
17:16 À : Apache AXIS C User List Objet : Re: Settings for Java Webservice (used by C++-Client)


Hello,

I need some more help. Is there anybody who has successfully developed an Axis C++ client calling a Java Webservice? At the moment it's not working at all. Are there other products (C++), which work together with Java Axis webservices?

I've read somewhere I should use doc/lit as message style. I've tried.
First I've generated a wsdl-file with java2wsdl. Then I've created the server skeletons (wsdl2java) and the client stubs (wsdl2ws). But wsdl2ws fails with a not reproducable error:

--------------------
java.util.NoSuchElementException
        at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
        at java.util.HashMap$ValueIterator.next(Unknown Source)
        at
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMe
thodInfo(Unknown Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
Source)
        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
Source)

        at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)

Code generation failed. Please see errors above.
--------------------

If I use rpc/lit, the stub code generation succeeds. But the soap messages look like this:

--------------------
<getStringResponse>
        <getStringReturn>test string</getStringReturn> </getStringResponse>
--------------------

There is no type definition and the client can't read any string.


It works, if I use rpc/encoded. But then I have the problem with URI_XSD and URI_ENC (ok, I can fix it with the patch). And I can't get int values or complex types with ints inside. It still doesn't work in the
1.6 alpha from June 1st, 3 a. m. Maybe in the next nightly build it will work, because Adrian has changed it yesterday (after the last nightly build?).

What may I do wrong? Please help.

Thanks,
Falk.