Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

AXis2 java client Problem

Thread view: 
itsprabhu@gmail.com - 30 Jan 2007 07:49 GMT
Hi all,
i have generated java files from wsdl using Axis2 wsdl2java. I need to
invoke a method in the web service. There is a stub file generated and
iam using them to test . But in my request i could see some extra
characters are appended after  the headers before the soapbody bec of
that am not getting response.

My java client is as follows
public class ConnClient {

       public static void main(String[] args)throws Exception {

           try{
           //    ALogin AL  = new ALoginImpl(Login.type);

               ALogin AL = ALogin.Factory.newInstance();
               AL.setUserName("admin");
               AL.setPassword("admin");
           ConnectionServiceStub stub = new ConnectionServiceStub();
           ServiceClient sc = stub._getServiceClient();
              Options sco = sc.getOptions();
           LoginDocument.Login LR =
LoginDocument.Login.Factory.newInstance();
           LR.setALogin( AL);

           LoginDocument requestDoc =
LoginDocument.Factory.newInstance();
           requestDoc.setLogin(LR);
            //call the method
            ResponseDocument response
=(ResponseDocument)stub.Login(requestDoc);
System.out.println(response.getResponse());
     }
     catch(Exception e){System.out.println(e);}
}
}

Soap request generated
------------------------------------
POST / HTTP/1.1
SOAPAction: "urn:#Login"
User-Agent: Axis2
Host: localhost:8008
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8

11b
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/"><soapenv:Header /><soapenv:Body><Login xmlns="http://
www.cisco.com/location/xsd"><AesLogin userName="admin"
password="admin" /></Login></soapenv:Body></soapenv:Envelope>
0

what is that 11b and 0?

Also if i change the soap version using options my req is as follows:

POST / HTTP/1.1
User-Agent: Axis2
Host: localhost:8008
Transfer-Encoding: chunked
Content-Type: application/soap+xml; charset=UTF-8;action="SoapAction :
urn:#Login";

119
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-
envelope"><soapenv:Header /><soapenv:Body><Login xmlns="http://
www.cisco.com/location/xsd"><AesLogin userName="admin"
password="admin" /></Login></soapenv:Body></soapenv:Envelope>
0
Is that the header length?

Can anyone help me out to remove that extra charcs.

Thanks in advance...
CemilB - 30 Jan 2007 14:03 GMT
You might want to look at www.ws02.com or, better yet, http://
www.wso2.org/projects/axis2/java. I think these folks support this.

Best regards,
Cemil

On Jan 30, 2:49 am, "itspra...@gmail.com" <itspra...@gmail.com> wrote:
> Hi all,
> i have generated java files from wsdl using Axis2 wsdl2java. I need to
[quoted text clipped - 70 lines]
>
> Thanks in advance...
itsprabhu@gmail.com - 31 Jan 2007 07:53 GMT
> You might want to look atwww.ws02.comor, better yet, http://www.wso2.org/projects/axis2/java. I think these folks support this.
>
> Best regards,
> Cemil

I have checked that thy also referring to axis2 page only. When i use
Axis1.x versions the request is proper but i cant change some headers
in that. Because of that i gone for this Axis2 but here some extra
charcs r appending in the req. Can anyone help me out .
Ravi3100@gmail.com - 28 Mar 2007 13:36 GMT
By default the messages are sent using chunked encoding. The numbers
119 etc are the lengths of
next chunk of data. For reference look at chunked encoding for http.

Hope it helps
Ravi

On Jan 30, 3:49 am, "itspra...@gmail.com" <itspra...@gmail.com> wrote:
> Hi all,
> i have generated java files from wsdl usingAxis2wsdl2java. I need to
[quoted text clipped - 72 lines]
>
> Thanks in advance...


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.