Integration of Java and. NET Web Services based on WS-Security (II)

Source: Internet
Author: User
Integration of Java and. NET Web Services based on WS-Security (II)
Rottenapple
4. Open Jbuilder9 and create a new java class named TestNetService. And add the jar package of the axis-wsse-1.0 to jdk of Jbuilder (Tools-> configions jdks-> class tab-> add) the code is as follows:
Package MyWebServiceJavaClient;
Import java. util. Date;
Import java. text. DateFormat;
Import org. apache. axis. MessageContext;
Import org. apache. axis. message .*;
Import org. apache. axis. client .*;
Import org. apache. axis. utils .*;
Import javax. xml. namespace. QName;
Import java. lang. Integer;
Import javax. xml. rpc. ParameterMode;
Import net. vitale. filippo. axis. handlers. WsseClientHandler;
/**
* <P> Title: </p>
* <P> Description: </p>
* <P> Copyright: Copyright (c) 2004 </p>
* <P> Company: </p>
* @ Author not attributable
* @ Version 1.0
*/

Public class TestNetService {
Static String usernameS = null;
Static String passwordS = null;
Public TestNetService (){
}

Public static void main (String [] args ){
Try {
Integer I = new Integer (2 );
Integer j = new Integer (2 );
String endpoint = "http: // localhost/MyServices/WebServiceTest/SumService. asmx ";

Service service = new Service ();
Call call = (Call) service. createCall ();

Call. setTargetEndpointAddress (new java.net. URL (endpoint ));
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.