Hi Swapna,
Thanks for you response.
**I am doing something like this:
WebServiceLocator service = new WebServiceLocator();
WebServiceSoap_PortType portType = null;
try {
portType = service.getWebServiceSoap();
service.setWebServiceSoapEndpointAddress(address);
((Stub)portType).setUsername("java");
((Stub)portType).setPassword("sun");
ConsumptionHistoryDetails chd = new
ConsumptionHistoryDetails(1234);
ConsumptionHistoryDetailsResponse response =
portType.getConsumptionHistoryDetails(chd);
System.out.println("request :
"+service.getCall().getMessageContext().getRequestMessage().getSOAPPartAsString());
}catch(Exception e){
e.printStackTrace();
}
looks like I am not able to connect to the service. Could you please let me
know if I am missing something?
Thanks,
Samanth.
On Wed, Aug 12, 2009 at 2:56 PM, sksalver <[email protected]> wrote:
>
> add the following where it says "_resp = _call.invoke" in your stub class
>
>
>
> //*********************************************************************************************
>
> inputXML =
> _call.getMessageContext().getRequestMessage().getSOAPPartAsString();
> outputXML =
> _call.getMessageContext().getResponseMessage().getSOAPPartAsString();
>
>
>
> //*********************************************************************************************
>
> samanth marisetty wrote:
> >
> > Hi,
> >
> > I tried to do this.
> >
> > header.addChildElement("userID").addTextNode("java");
> > header.addChildElement("userPwd").addTextNode("sun");
> > ((Stub) portType).setHeader(header);
> >
> > but the problem is, I get a null response back from the service. I used a
> > tool called SoapUI to call the service, I was getting back the response.
> > Is
> > there a way to see what SOAP xml request is being sent? I mean a way to
> > log
> > or do a standard out?
> >
> > Thanks,
> > Samanth.
> >
> > On Wed, Aug 12, 2009 at 1:51 PM, sksalver <[email protected]> wrote:
> >
> >>
> >> You can use axis client stub class methos set header to do this.
> >>
> >> Thanks,
> >> Swapna
> >>
> >> samanth marisetty wrote:
> >> >
> >> > Hi,
> >> >
> >> > I am using WSDL2Java to create java stubs and want to write a
> >> client.
> >> I
> >> > wanted to know if there is any argument that I need to use, to
> generate
> >> > the
> >> > headers.
> >> >
> >> > Thanks,
> >> > Samanth.
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/WSDL2Java-header-creation-issues-tp24940347p24941612.html
> >> Sent from the Axis - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/WSDL2Java-header-creation-issues-tp24940347p24942634.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>