Accessing WSDL through NetBeans servlet

Hello,

I'm really new to WSDL and need some clarification. I am trying to access WebServices through NetBeans-generated servlet and the login() method supposed to take userId and password:

<?xml version="1.0" encoding="utf-8"?>

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

<soap:Header>

<StatusHeader xmlns="http://ws.globaltsg.com/TSGWebServices">

<clientHostAddress>string</clientHostAddress>

<serverRequestStartTime>dateTime</serverRequestStartTime>

<serverRequestEndTime>dateTime</serverRequestEndTime>

<serverVersion>unsignedInt</serverVersion>

<internalRequestId>unsignedInt</internalRequestId>

</StatusHeader>

</soap:Header>

<soap:Body>

<Login xmlns="http://ws.globaltsg.com/TSGWebServices">

<request>

<agencyId>string</agencyId>

<userName>string</userName>

<userPassword>string</userPassword>

</request>

</Login>

</soap:Body>

</soap:Envelope>

But all I get is a request_1 variable as parameter for login() function

try{// Call Web Service Operation

com.constellation1.WebService service =new com.constellation1.WebService();

com.constellation1.WebServiceSoap port = service.getWebServiceSoap();

// TODO initialize WS operation arguments here

com.constellation1.LoginRequest request_1 =new com.constellation1.LoginRequest();

port.login(request_1);

}catch (Exception ex){

// TODO handle custom exceptions here

}

My question is: How can I make the request_1 variable contain login information such as userId and password?

Please help,

Victor.

Message was edited by:

vic_sk

[2523 byte] By [vic_ska] at [2007-11-27 1:31:47]
# 1
I'm not sure this is the right forum where post this issue, but it would be nice if you post the WSDL so I can have an idea on the service structure. Anyway I think that your com.constellation1.LoginRequest class has some suitable methods to populate it with the login information.
Anhura at 2007-7-12 0:35:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Hi,Thank you for replying. This is the WSDL file I'm connecting to: http://ws.globaltsg.com/TSGWebServices/WebService.asmx?WSDLI've looked at com.constellation1.LoginRequest, but it does not have any methods that would make it work.
vic_ska at 2007-7-12 0:35:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

As far as I see you have a Login object which has a setRequest(LoginRequest value) method. This method gets a LoginRequest object that must be set up with these methods

setAgencyId(String value)

setUserName(String value)

setUserPassword(String value)

I hope this helps...

Anhura at 2007-7-12 0:35:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...