Web Service
Dear Sir,
My code is :-
For webService:-
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService
public class PaymentInfo {
@WebMethod
public String updatePaymentDetails(@WebParam String[] parms)
{
System.out.println("Length of Array = " + parms.length);
return "abcd";
}
}
and for client is:-
import javax.xml.namespace.QName;
import javax.xml.rpc.Call;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
public class PaymentInfoTestClient {
public static void main(String[] args) {
try {
String NS_XSD = "http://www.w3.org/2001/XMLSchema";
ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(new QName("http://lhcc.rdmindia.com/", "ATOMService"));
String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
Call call = service.createCall(new QName("http://lhcc.rdmindia.com/", "ATOMPort"));
call.setTargetEndpointAddress("http://localhost:8081/lhcc?wsdl");
call.setOperationName(new QName("http://lhcc.rdmindia.com/","updatePaymentDetails"));
QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
call.setReturnType(QNAME_TYPE_STRING);
call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
call.setReturnType(QNAME_TYPE_STRING);
call.addParameter("arg0", QNAME_TYPE_STRING,ParameterMode.IN);
String arg0 = new String("123");
String arg1 = new String("40502820");
String arg2 = new String("0715");
String arg3 = new String("21APR2011");
String arg4 = new String("PNR123");
String arg5 = new String("500");
String arg6 = new String("xyz");
String[] parms = {arg0, arg1, arg2, arg3, arg4,arg5, arg6};
String result = (String)call.invoke(parms);
System.out.println(result);
} catch (Exception e) {
e.printStackTrace();
}
}
}
.................................................................................
I am passing params (array of string type) its length is 7 , but it is printing only 1, could you please suggest me for this.
View Answers
Related Tutorials/Questions & Answers:
web serviceweb service i want to make an
web service example so please help me out thanks
web service would be grateful :):)
So i want to creat a
web service that display the bus... coordinate will be send to my
web service in a array list but i cant translate this into a code; my problem is in the
web service side : in wich class i will do
Advertisements
Web ServiceWeb Service Dear Sir,
My code is :-
For webService:-
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService...";
ServiceFactory factory = ServiceFactory.newInstance();
Service service Web ServiceWeb Service Dear Sir,
My code is :-
For webService:-
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService...";
ServiceFactory factory = ServiceFactory.newInstance();
Service service web serviceweb service How servlet class
create in
web services or how html code used in webservice. pls give example which contain servlet code
web serviceweb service How servlet class
create in
web services or how html code used in webservice. pls give example which contain servlet code
Web service protocol stackWeb service protocol stack hii,
What is the
Web service protocol stack?
hello,ADS_TO_REPLACE_1
The
Web service protocol stack is an evolving set of protocols used to define, discover, and implement
Web services
Web Service Tutorial - WebSevicesWeb Service Tutorial hi,
i am asking you again for my previous question of
web service.
you told me about a link but there is no link in your... the attachment of a step by step procedure of creating
web service.
Thanks and Regards
web service & databaseweb service & database Hi,
I need help with importing data from
web service to ms sql/my sql. I developed a
web service using Axis2 (v1.6.2) and Tomcat (v7.0.27) running on Eclipse Indigo. I can connect to the
web services
Web Service - WebSevicesWeb Service Hi All I have
web service in .net , and i have to call it from java spring. How can i do it? Thanks
Web Service Tutorial - WebSevicesWeb Service Tutorial hi,
i am new to
web service and not much have idea about
web services.
right now i am using myeclipse blue 7.1 as my java IDE... the steps of creating a simple
web service.
Thanks and Regards
Nishi
web service frameworksWeb
service Frameworks
Web service Frameworks:
There are many frameworks for
web
services. Here is the list of some frameworks
web service protocolsWeb service Protocols
Web service protocols:
Here is the list of some protocols used for
Web Services:ADS_TO_REPLACE_1
web service clientweb service client i have implement
web service client in netbeans and it work will using wsdl
but know i want to Develop a webserivce (or a Java RMI server/client) for one of the e-services but i do not know the wsdl link how
web service - JSP-Servletweb service How to call a
web service from JSP post method? Method in JSPHi! In this JSP Example you'll see, how to call
web service from JSP methodName the file as usingMethod.jsp JSP Code- - - - -<%@ page
web service problem - WebSevicesweb service problem I have created
web service client and server for File transfering using axis2/java.I want to add JAX-RPC client Handler...; Thank u....Actually
web service without client handler is working. I want
Spring web service - SpringSpring
web service
Respected
service,
I have found an error in this manner(Connecting to tomcat then coming this error at first time only)
and then working correctly. error coming only at first time. What
Java - Web ServiceJava -
Web Service code that allow the user to input file name with path Hi,
I wanted a simple java program for
web services development as per below:
------ IN REQUEST ------
<FileName>
FileName - Path
developing simple web serviceOpen
Source
web services tool in java
...:
The
Web Services Invocation Framework (WSIF) is a simple Java API
for invoking
Web services, no
matter how or where the services are provided
Java - Web ServiceJava -
Web Service Hi,
I wanted a simple java program for
web services development as per below:
------ IN REQUEST ------
<FileName>
FileName - Path of the file (For example: C/text.txt)
------ IN RESPONSE
Java - Web ServiceJava -
Web Service Hi,
I wanted a simple java program for
web services development as per below:
------ IN REQUEST ------
<FileName>
FileName - Path of the file (For example: C/text.txt)
------ IN RESPONSE
web service call in jsp pageweb service call in jsp page I am wandering on internet for hours... a
web service when you have a WSDL.
I am using tomcat
web server and eclipse ,a simple example to demostrate the
web service calling would be good for me...
I
Security in Web Service Security in
Web Service
...
Develop a
web service program for Square area calculation. Make this
web service secured using security mechanism of “Username
get images from web serviceget images from
web service How to get images from
web services in iPhone application?
to get images from
web service xml?
For Uploading
NSString *encodedString=[self encode:(const uint8_t*)_secretData.bytes
create login java web service - WebSevicescreate login java
web service Hi,
I am kind of newb in java
web service development , i want to write a simple
web service application that client... in this
web site, but it seems different.
Thanks
Large File reading through Axis2 Web service.
This is regarding the
web service help which i am looking for. I am currently working on axis2
web service and i am very new to this. so need your help... have to write a
web service which would read the XML or JSON(format) data which
Regarding Simple Web service example - WebSevicesRegarding Simple
Web service example hi
i am trying to follow the simple
web service example in the tutorials and it develops the application in Netbeans IDE using the GlassFish Server . however when i did the same
secure web service using mutual certificate securitysecure
web service using mutual certificate security hello, i need... truststore
then i change secure properties in
web service and
web service client to point to mine keystore and truststore:
web service properties:
keystore
Unable to create web service client in javaUnable to create
web service client in java When i try to create a client for the WSDL http://infml00871:82/MapperWebService/Mapper?wsdl with JBossAS 4.2 server configuration and JBossWS as server runtime.
I get the following
Google web Service (GWS)Google
web Service (GWS)
Most users spend their time with Google while...
for it. Google provides its search functionality as its
web service How to get xml file form http port using web serviceHow to get xml file form http port using
web service hi
I am suresh i am using netbeans 6.9 to develop a
web service for getting xml from http port... struck with getting xml file. How to access xml file in
web service?
Please Help
Developing Simple Web ServiceDeveloping
Simple
Web Service
... developing
web services with Axis2 by
an easy example ?HelloWorldService? and deploying it on the tomcat
web server.
Step 1: Build Axis2
Web