Hi,
Here is an example, change to suit for needs.
Create the stub - see the createStub method
Then call the operation methods on the stub
==============================================================
import java.io.* ;
import sdo.commonj.* ;
import org.apache.axis.types.IDRef ;
import com.ibm.www.xmlns.prod.serviceregistry._6._0.sdo.* ;
import com.ibm.www.xmlns.prod.serviceregistry._6._0.ws.sdo.* ;
public class Test
{
public static void main ( String[] args ) throws Exception
{
// System.setOut ( new PrintStream ( new FileOutputStream (
"STDOUT.TXT" ) ) ) ;
// System.setErr ( new PrintStream ( new FileOutputStream (
"STDERR.TXT" ) ) ) ;
run () ;
}
private final static void run () throws Exception
{
System.out.println ( "run" ) ;
String url = null ; // "http://myhost/..."
WSRRCoreSDOSoapBindingStub stub = createStub ( null, null, url ) ;
/*
Delete
*/
// stub.delete ( "deleteURI" ) ;
/*
Retrieve
*/
// DataGraphType dataGraph = stub.retrieve ( "retrieveURI" ) ;
/*
ExecuteNamedQuery
*/
// DataGraphType[] dataGraphArray = stub.executeNamedQuery ( "query"
) ;
/*
Update
*/
// DataGraphType dataGraph = createDataGraph ( null, "ROOTID" ) ;
// stub.update ( dataGraph ) ;
/*
Create
*/
DataGraphType dataGraph = createDataGraph ( null, "ROOTID" ) ;
String createURI = stub.create ( dataGraph ) ;
}
public final static DataGraphType createDataGraph ( BaseObject[]
objectArray, String rootID )
{
WSRR wsrr = new WSRR () ;
wsrr.setRoot ( new IDRef ( rootID ) ) ;
wsrr.setArtefacts ( objectArray ) ;
DataGraphType dataGraph = new DataGraphType () ;
dataGraph.setWSRR ( wsrr ) ;
return dataGraph ;
}
public final static WSRRCoreSDOSoapBindingStub createStub ( String user,
String password, String url ) throws Exception
{
WSRRCoreSDOServiceLocator locator = new WSRRCoreSDOServiceLocator ()
;
String endPoint = locator.getWSRRCoreSDOPortAddress () ;
if ( url != null )
{
endPoint = url ;
}
WSRRCoreSDOSoapBindingStub stub =
(WSRRCoreSDOSoapBindingStub)locator.getWSRRCoreSDOPort ( new java.net.URL (
endPoint ) ) ;
if ( user != null && password != null )
{
stub.setUsername ( user ) ;
stub.setPassword ( password ) ;
}
return stub ;
}
}
==============================================================
-----Original Message-----
From: msg2ajay [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 9 January 2008 3:30 PM
To: [email protected]
Subject: What to do after creating Stup using Axis1.4
hello friends,
I am new to WebService's I have created Stub. I got 5 class files
Service
ServiceLocator
ServiceSoap
ServiceSoap12Stub
ServiceSoapStub
I have a url(WebService running), which i need to conect with client. So Can
any bady give me a little guidence what need next to do.
thanQ for any kind of help.
Han.
--
View this message in context:
http://www.nabble.com/What-to-do-after-creating-Stup-using-Axis1.4-tp1470509
2p14705092.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]