Re: An RFC example needed! - 2

2006-03-14 Thread Niels Baloe

Hi all,

Well, I fixed the problem, by enabling the java.net debug mode, I could 
easily track down the problem and solve it (reading between the lines of 
encoded and decoded stuff). Yesterday I ended up with the XML message as 
I've sended it, without knowing it I was nearly finished. I only had to 
specify the return type (because it is an array-agr), and voila.


Note that I'm not unhappy with Axis, actually I'm quite happy with it. I 
hope the things I say help improving Axis. Like the suggestion to return the 
plain HTTP-output when the response serialiser doesn't receive anything it 
can parse (for example when you are talking to a Microsoft webservice which 
doesn't use SOAP:FAULT to say things back but only in plain text without any 
soap headers).


I hope Axis2 will end up as good as Axis1. For example, it's a good thing to 
use a deploy mechanism that looks more like Tomcat. I wondered why you'ld 
want to introduce another deploy language (the one in Apache SOAP and now 
the one in Apache Axis1) when already having the services.xml mechanism in 
Tomcat.


Thanks for now,

Niels Gorisse

_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/




Re: An RFC example needed!

2006-03-14 Thread Niels Baloe

Hi all,

Thanks for your reply's.


Take a look at the migration guide:

http://ws.apache.org/axis2/0_93/migration.html


Yes I've seen it, I took some time to implement that example, but it isn't 
complete. It uses the echo example, look at the the word 'ClientUtil' in " 
ClientUtil.getEchoOMElement();  " while at the same time the Axis1 example 
above clearly shows that you can work with the 'String' type right out of 
the box (and it's terribly simple to register other types as well!!). On the 
other hand, Axis2 introduces an 'OMElement' but nothing clearly shows (at 
least for me) how to work with it. I've seen some registering stuff in the 
echo example though, but it didn't work out. Really, a simple example which 
completely works (like with a class Address { String name,String telephone} 
) is needed. Simple examples makes an API good.


Another thing, I don't like a lot of code being added to my data classes. 
I've seen what axis2 does to my classes. Is that really needed? In Axis1 I 
don't have any generated garbage in my classes (except get and set functions 
which are harmless); in fact there's only one _method_ (not even a class) 
which calls the service, complete with registering and everything. It looks 
like in Axis2 all classes will be filled with generated stuff, before I can 
be a client application. Or am I wrong?



http://issues.apache.org/jira/browse/AXIS2-485?page=all


I'll look to it in a moment, thanks! Perhaps I can help?

BTW, the address example in the axis 1.x uses WSDL style 'rpc encoded' . 
For

the time being you need to use document / literal with axis2 .


I switched to wrapped/literal right away because I'm talking with .NET 
clients too. But I'm not using that example at all, I wrote my own;). I only 
looked at it as it is a clear way of how to write my client-method. That was 
about two weeks ago.


You're right -- the Apache SOAP page should provide a warning that tells 
you to use Axis 1 instead.


Thanks. Is there a place where I should mail it to?
Of course, Axis2 doesn't look complete yet, in the future the main Axis1 
page should say that it is depreciated.


After you have refined your WSDL file, then you want to use wsdl2java to 
regenerate your service skeleton and WSDD file.


Perhaps if you posted your WSDL and WSDD files we could provide you with a 
little more assistance.


Well, in fact, I simply did that, I generated the WSDL, it looked fine, then 
I gave it to the .NET service, and they implemented it accordingly. No 
wonder: everything works fine (this computer being a server and running the 
client code to access this computer). But really, the WSDL or the message is 
not the issue at all. I manually wrote a serialiser to get capitals inside 
some headers, untill the generated message worked fine (peeking with the 
TCPTunneler), while manually sending the message itsself with some a 
pure-java code. If I send the captured message with a normal Java socket, it 
works perfectly, but if Axis1 does the trick, it simply doesn't work. And 
the only difference in the two messages is the \1.0 -- \1.1 number. See for 
yourself below! So, how do I force the HTTP\1.1 usage?


Thank you very much!,
Niels


-


Sending with a pure-java client:
""
POST /axis/services/rpcrouter HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.voorst.nl/VoorstVariant/getGemeenteInfo";
User-Agent: Java/1.5.0_06
Host: localhost:90
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 1198


  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

 
xmlns:ns1="http://www.voorst.nl/VoorstVariant/";>

   
   ***
   ***

 
 
http://www.voorst.nl/VoorstVariant/";>
   xmlns:ns2="http://www.voorst.nl/VoorstVariant/";>
  xsi:type="xsd:string">203000,471000 
203600,472000 203700,472000 203700,471900 
203600,471900

   

 
  
"

Sending with Axis1:

""
POST /axis/services/rpcrouter HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: localhost:90
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://www.voorst.nl/VoorstVariant/getGemeenteInfo";
Content-Length: 1057


  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

 
xmlns:ns1="http://www.voorst.nl/VoorstVariant/";>

   
   ***
   ***

 
 
http://www.voorst.nl/VoorstVariant/";>
   xmlns:ns2="http://www.voorst.nl/VoorstVariant/";>
  xsi:type="x

Re: An RFC example needed!

2006-03-13 Thread Anne Thomas Manes
Niels,You're right -- the Apache SOAP page should provide a warning that tells you to use Axis 1 instead. Axis 2 isnt feature-complete yet, so I don't think it's appropriate to put the same warning on the Axis 1 page. Axis 1 is Apache's current production release SOAP engine. Given that you've already started working with Axis 1, I suggest you stick with it rather than re-writing your app for Axis 2. 
When trying to enable interoperability with .NET, it's always a good idea to adopt the "WSDL First" approach. You can use java2wsdl to generate a first pass at a WSDL file, but then you should tweak the WSDL to ensure that it supports the structures you want. And yes, you want to request the "wrapped" style, and you want to name each of your arguments. 
After you have refined your WSDL file, then you want to use wsdl2java to regenerate your service skeleton and WSDD file. Perhaps if you posted your WSDL and WSDD files we could provide you with a little more assistance. 
AnneOn 3/13/06, Niels Baloe <[EMAIL PROTECTED]> wrote:
Hi all,I have a problem.Last week I needed to implement a webservice, I saw Apache SOAP, heared somegood things about it, so I used it to implement my webservice, and it workedquite fine in no-time. Then I needed to do things with a WSDL and I found
out about Apache Axis. Hmmm, well, so I shifted to Axis. No big problems,one day later Axis was running the thing, and I could generate a WSDL (andback) too. Note: why the heck doesn't the Apache SOAP frontpage say: "DON't
USE THIS, USE AXIS INSTEAD!" I recommend it.Anyway, now I have to communicate with a .NET service. So I've set thecommunication to 'wrapped', and thanks to some text-based java-code Ialready had (because the Axis exception doesn't say anything else then
'null'!!-- it should just wrap the HTTP response which contains the textualerror from the server), I found out that .NET needs a specific name asthe first argument of the function instead of the automatic 'arg0' (grrr),
and that it needed capitals in some header stuff. So today I wrote a customserialiser too to provide the capitals in the header. Pf. And it worksquite fine in the text-only tester (sending exactly what Axis generates),
but not in Axis. Why? The only difference in the two messages (text andAxis) is HTTP/1.1 versus HTTP/1.0. And I suspect it is a shared IP. Anyway,I didn't succeed in changing the header to 1.1 inside Axis...
So, today I found out about Axis2. Yes, a bit stupid yes, but then again,why doesn't the Axis1 frontpage say anything about it (the first line wouldbe a nice place;) ). But, Axis2 has a different way of deploying, and
currently I first want to get an example running. But, there are no examplesthat use the word 'call' or that throw around an object. [ Note: I can't useAxis1 and Axis2 together as well, because of a namespace-clash with the
logging, so I have to switch to Axis2 in the end. ] Anyway, does anyone havean example? Yes I know about the user guide examples, but these do notdemonstrate something with sending and receiving objects. We are not in the
stone ages, I'm not going to parse a tree myself, I need objects. I justneed an example like the 'address' example in ApacheSOAP/Axis1.4, which hasa class Address {..} which is thrown aroundPS. Another thing: why doesn't the Java2WSDL contain a main() anymore? It's
quite convenient.Thank you very much for any advice. Either an example, or notifying of howto set Axis1.4 to HTTP/1.1 would be really very great!All the best,Niels Gorisse_
Don't just search. Find. Check out the new MSN Search!http://search.msn.com/


Re: An RFC example needed!

2006-03-13 Thread robert lazarski
Take a look at the migration guide: 

http://ws.apache.org/axis2/0_93/migration.html

There will be a new axis2 release in the upcomming days, and this page
will have an axis 1.x to axis2 data binding (wsdl) example. In the
meantime, you can take a peek here: 

http://issues.apache.org/jira/browse/AXIS2-485?page=all

BTW, the address example in the axis 1.x uses WSDL style 'rpc encoded'
. For the time being you need to use document / literal with axis2 . 

HTH,
Robert
http://www.braziloutsource.com/On 3/13/06, Niels Baloe <[EMAIL PROTECTED]
> wrote:Hi all,I have a problem.Last week I needed to implement a webservice, I saw Apache SOAP, heared some
good things about it, so I used it to implement my webservice, and it workedquite fine in no-time. Then I needed to do things with a WSDL and I foundout about Apache Axis. Hmmm, well, so I shifted to Axis. No big problems,
one day later Axis was running the thing, and I could generate a WSDL (andback) too. Note: why the heck doesn't the Apache SOAP frontpage say: "DON'tUSE THIS, USE AXIS INSTEAD!" I recommend it.
Anyway, now I have to communicate with a .NET service. So I've set thecommunication to 'wrapped', and thanks to some text-based java-code Ialready had (because the Axis exception doesn't say anything else then
'null'!!-- it should just wrap the HTTP response which contains the textualerror from the server), I found out that .NET needs a specific name asthe first argument of the function instead of the automatic 'arg0' (grrr),
and that it needed capitals in some header stuff. So today I wrote a customserialiser too to provide the capitals in the header. Pf. And it worksquite fine in the text-only tester (sending exactly what Axis generates),
but not in Axis. Why? The only difference in the two messages (text andAxis) is HTTP/1.1 versus HTTP/1.0. And I suspect it is a shared IP. Anyway,I didn't succeed in changing the header to 1.1 inside Axis...
So, today I found out about Axis2. Yes, a bit stupid yes, but then again,why doesn't the Axis1 frontpage say anything about it (the first line wouldbe a nice place;) ). But, Axis2 has a different way of deploying, and
currently I first want to get an example running. But, there are no examplesthat use the word 'call' or that throw around an object. [ Note: I can't useAxis1 and Axis2 together as well, because of a namespace-clash with the
logging, so I have to switch to Axis2 in the end. ] Anyway, does anyone havean example? Yes I know about the user guide examples, but these do notdemonstrate something with sending and receiving objects. We are not in the
stone ages, I'm not going to parse a tree myself, I need objects. I justneed an example like the 'address' example in ApacheSOAP/Axis1.4, which hasa class Address {..} which is thrown aroundPS. Another thing: why doesn't the Java2WSDL contain a main() anymore? It's
quite convenient.Thank you very much for any advice. Either an example, or notifying of howto set Axis1.4 to HTTP/1.1 would be really very great!All the best,Niels Gorisse_
Don't just search. Find. Check out the new MSN Search!http://search.msn.com/


An RFC example needed!

2006-03-13 Thread Niels Baloe

Hi all,

I have a problem.

Last week I needed to implement a webservice, I saw Apache SOAP, heared some 
good things about it, so I used it to implement my webservice, and it worked 
quite fine in no-time. Then I needed to do things with a WSDL and I found 
out about Apache Axis. Hmmm, well, so I shifted to Axis. No big problems, 
one day later Axis was running the thing, and I could generate a WSDL (and 
back) too. Note: why the heck doesn't the Apache SOAP frontpage say: "DON't 
USE THIS, USE AXIS INSTEAD!" I recommend it.


Anyway, now I have to communicate with a .NET service. So I've set the 
communication to 'wrapped', and thanks to some text-based java-code I 
already had (because the Axis exception doesn't say anything else then 
'null'!!-- it should just wrap the HTTP response which contains the textual 
error from the server), I found out that .NET needs a specific name as 
the first argument of the function instead of the automatic 'arg0' (grrr), 
and that it needed capitals in some header stuff. So today I wrote a custom 
serialiser too to provide the capitals in the header. Pf. And it works 
quite fine in the text-only tester (sending exactly what Axis generates), 
but not in Axis. Why? The only difference in the two messages (text and 
Axis) is HTTP/1.1 versus HTTP/1.0. And I suspect it is a shared IP. Anyway, 
I didn't succeed in changing the header to 1.1 inside Axis...


So, today I found out about Axis2. Yes, a bit stupid yes, but then again, 
why doesn't the Axis1 frontpage say anything about it (the first line would 
be a nice place;) ). But, Axis2 has a different way of deploying, and 
currently I first want to get an example running. But, there are no examples 
that use the word 'call' or that throw around an object. [ Note: I can't use 
Axis1 and Axis2 together as well, because of a namespace-clash with the 
logging, so I have to switch to Axis2 in the end. ] Anyway, does anyone have 
an example? Yes I know about the user guide examples, but these do not 
demonstrate something with sending and receiving objects. We are not in the 
stone ages, I'm not going to parse a tree myself, I need objects. I just 
need an example like the 'address' example in ApacheSOAP/Axis1.4, which has 
a class Address {..} which is thrown around



PS. Another thing: why doesn't the Java2WSDL contain a main() anymore? It's 
quite convenient.


Thank you very much for any advice. Either an example, or notifying of how 
to set Axis1.4 to HTTP/1.1 would be really very great!


All the best,

Niels Gorisse

_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.com/