Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


Ankur Gupta
Web Service
0 Answer(s)      3 years ago
Posted in : WebSevices


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.


Advertisement
View Answers

Related Tutorials/Questions & Answers:
web service
web 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 Service
Web 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 Service
Web 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 service
Web service  webservices in JSP
web service
web service  How servlet class create in web services or how html code used in webservice. pls give example which contain servlet code
web service
web service  How servlet class create in web services or how html code used in webservice. pls give example which contain servlet code
xcode web service example
xcode web service example  xcode web service example
Web service protocol stack
Web service protocol stack  hii, What is the Web service protocol stack?   hello, The Web service protocol stack is an evolving set of protocols used to define, discover, and implement Web services
web service & database
web 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 Tutorial - WebSevices
Web 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 - WebSevices
Web 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 frameworks
Web service Frameworks         Web service Frameworks: There are many frameworks for web services. Here is the list of some frameworks
web service protocols
Web service Protocols         Web service protocols: Here is the list of some protocols used for Web Services
Web Service Tutorial - WebSevices
Web 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 client
web 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-Servlet
web 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 - WebSevices
web 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 - Spring
Spring 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 Service
Java - 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
Fedex web service
Fedex web service  sir how can use fedex api
developing simple web service
Open 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 Service
Java - 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 Service
Java - 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 page
web 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 service
get 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
Attachement in Web Service + EJB 3 + Jboss
Attachement in Web Service + EJB 3 + Jboss  How to send attachements in Web Service using EJB3 with JBoss Application Server
create login java web service - WebSevices
create 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 - WebSevices
Regarding 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 security
secure 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
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
Understanding quality of service for Web services Improving the performance of your Web services
Understanding quality of service for Web services Improving... of the service. In this article, we look at the various Web service QoS... of measuring response time of your Web services using the service proxy
Unable to create web service client in java
Unable 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
Creating a web service that connects to the database - WebSevices
Creating a web service that connects to the database  Hello, Good... DataSource customer; /** * Web service operation.../webservices/web-services-database.shtml Let me know if you face any problem
how to expose blob in restful web service client java rest template
how to expose blob in restful web service client java rest template  how to expose blob in restful web service client java rest template
Java Building a Simple Web Service ? A Tutorial Tutorial
Building a Simple Web Service ? A Tutorial... In this tutorial we will create a simple web service and a client web application... service on Tomcat 5.5.4 web application server. This application, while simple
Web Service - Which files we have to give to client and how they will use that
Web Service - Which files we have to give to client and how they will use that  Hello, 1) I was created sample web service and i want to expose this web service or want to give it to client , for that which files i have to give
How to use web service in J2ME application(MIDP) - MobileApplications
How to use web service in J2ME application(MIDP)  I have created two separate application, one that has J2ME Midlet application and another has web service. Now i want to call that web service in my Midlet application so how
Not able to call Web Service from Eclipse
; To solve the problem I added httpcore-4.0.jar into web application. This solved
How to get xml file form http port using web service
How 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
how to expose blob in restful web service client java
how to expose blob in restful web service client java   how to expose blob in restful webservice clientside and how to convert the blob into a file,please help me
how to expose blob in restful web service client java
how to expose blob in restful web service client java   how to expose blob in restful webservice clientside and how to convert the blob into a file,please help me
Developing Simple Web Service
Developing 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
J2EE Web Service Development with Attachments Using Axis
J2EE Web Service Development with Attachments Using Axis... the development of a java web service that takes DIME or MIME attachment as input... have a basic understanding of J2EE web service development. Introduction
ISAPI Filter Issue Error from Web Service ("Error:- InternetOpenUrl()")
ISAPI Filter Issue Error from Web Service  <p>I have writen MFC application for ISAPI filter which will authenticate and authorization... from web service.Error is "Error:- InternetOpenUrl().". This error is coming
Web Hosting Services,Affordable Web Hosting in India,Web Hosting Service Provider India
is known as web hosting service provider company, this is a paid service, so it is called Web Hosting Service. Typically a Web hosting company... services. RoseIndia: a specialized web hosting service provider company
Web Hosting Services,Affordable Web Hosting in India,Web Hosting Service Provider India
Web Hosting Services Rose India offers reliable, quick and dedicated web hosting services and solutions for personal and small... unhindered services no matter what the traffic load. We offer multiple web hosting
Create a Web Service in Java using Apache Axis2 and Eclipse with Oracle database driven
Create a Web Service in Java using Apache Axis2 and Eclipse with Oracle... a requirement of connecting an external system using web service developed which uses eclipse ID and Apache axis 2 services. The web service should be based on bottom-up
 

 

 

DMCA.com