Help needs to build this web service and do this exercise

**i'm a newbie to java. can anybody give me a help here.**
Exercises :
1) Develop customer profile web service as below: which having two methods saveCustomer and retrieveCustomer
Customer infomation data structure as follows
CustomerID :string
Name :string
phoneNumber : int
Address : Object which contain(home number(int), street(string), town(string))- Complex type object
Age: int
LastBalance: double
Ex1:
you send the SOAP request (in your web service call) with customer id or phone number the web service should return customer information and display as system out.
Note Just hard code customer dummy data inside web service method call getCustomerData which return the customer object.
Ex2
Compose customer object (java object) in client side and send via web service using web service save method to write to a data to text file in server side (in your case same machine , but it create by customer profile web service not the web service client)
Objective of this exercise is to understand web service / soap complex and simple variable types and how to exchange those with SOAP request and response.
Exercise 3:
send some wrong customer id or phone number as input to webservice method "retrieveCustomer" and generate error and send it via SOAP fault to client and display it

ok thanks any way. i hav done most of the exercise. don't know wthr the appraoch is correct or incorrect. i'll post what i have done up to now.
Customer.java FILE
package com.server;
public class Customer {
     public String customerID;
     public String customerName;
     public int phoneNumber;
     public Adress[] address;
        public int age;
     public double balance;
Address.java FILE
package com.server;
public class Address {
     public int homeNumber;
     public String street;
     public String town;
CustomerService.java FILE
package com.server;
public class CustomerService{
     public Customer getCustomerData(int CustomerID){
          Address address1 = new Address();
          address1.homeNumber = 23;
          address1.street = "silva lane";
          address1.town = "kandy";
          Address address2 = new Address();
          address2.homeNumber = 45;
          address2.street = "gampola road";
          address2.town = "peradeniya";
          Address [1] address = new Address[] { address1, address2 };
          Customer customer = new Customer();
          customer.customerID = "abc";
          customer.customerName = "mahesh";
          customer.customerphoneNumber = 345565767;
          customer.address = address;
          customer.age = 25;
          customer.balance = 25000.00;
          return customer;
}is thr anything i hav missed. please advice.
Edited by: kellyg909 on Mar 31, 2009 9:26 AM

Similar Messages

  • Help needed in calling a Web service

    Hi,
    I want to call a web service from my component. The called web service might have different names, therefore I don't want to use the proxy class way.
    I am facing problem in parsing the input parameters from the wsdl file. I have attached the wsdl file at the end.
    I am using the javax.wsdl.xml.WSDLReader(axis). I have been able to parse all the bindings, ports and messages but
    1. i am not able to parse the wsdl:types to obtain the input parameters
    //javax.wsdl.Operation op obtained from the port which alternatively obtained from Definition
    Message inputs = op.getInput().getMessage();
    Part part = null;
    // let's find the input params
    Map inputParts = inputs.getParts();
    // create the object array which Axis will use to pass in the parameters
    inputParams = new Object[inputParts.size()];
    s = inputParts.keySet();
    it = s.iterator();
    int i = 0;
    while(it.hasNext())
    part = (Part) inputParts.get(it.next());
    Afetr performing this, i have no clue as to how to parse the input parameters.
    2. How will i generate the java Objects array from these input parameters to pass to the Call.invoke function, i.e.
    Call call = (Call) service.createCall();
    call.setOperation(portQN, operationName);
    Object ret = (Integer) call.invoke(inputParams);
    The function takes an object[] as input but since i have complex types involved in wsdl, so how will this object array needs to be populated
    WSDL file:
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://V4_0.testcenter8" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax258="http://testcenter8.V4_0.testcenter8/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax257="http://V4_0.testcenter8/xsd" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://V4_0.testcenter8">
    <wsdl:types>
    <xs:schema xmlns:ax260="http://V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8">
    <xs:import namespace="http://V4_0.testcenter8/xsd" />
    <xs:element name="executeRuleset">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="param0" nillable="true" type="ax257:testcenter8_V4_0_Req" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="executeRulesetResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="return" nillable="true" type="ax257:testcenter8_V4_0_Resp" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    <xs:schema xmlns:ax259="http://testcenter8.V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8/xsd">
    <xs:import namespace="http://testcenter8.V4_0.testcenter8/xsd" />
    <xs:complexType name="testcenter8_V4_0_Req">
    <xs:sequence>
    <xs:element minOccurs="0" name="cabinetName" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
    <xs:element minOccurs="0" name="loginReqd" type="xs:boolean" />
    <xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
    <xs:element minOccurs="0" name="password" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="userName" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="testcenter8_V4_0_Resp">
    <xs:sequence>
    <xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
    <xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://testcenter8.V4_0.testcenter8/xsd">
    <xs:complexType name="Inputs">
    <xs:sequence>
    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="subject" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Outputs">
    <xs:sequence>
    <xs:element minOccurs="0" name="category" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="massRequestType" type="xs:int" />
    <xs:element minOccurs="0" name="subCategory" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="executeRulesetRequest">
    <wsdl:part name="parameters" element="ns:executeRuleset" />
    </wsdl:message>
    <wsdl:message name="executeRulesetResponse">
    <wsdl:part name="parameters" element="ns:executeRulesetResponse" />
    </wsdl:message>
    <wsdl:portType name="testcenter8_V4_0WebServicePortType">
    <wsdl:operation name="executeRuleset">
    <wsdl:input message="ns:executeRulesetRequest" wsaw:Action="urn:executeRuleset" />
    <wsdl:output message="ns:executeRulesetResponse" wsaw:Action="urn:executeRulesetResponse" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="testcenter8_V4_0WebServiceSoap11Binding" type="ns:testcenter8_V4_0WebServicePortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <wsdl:operation name="executeRuleset">
    <soap:operation soapAction="urn:executeRuleset" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="testcenter8_V4_0WebServiceSoap12Binding" type="ns:testcenter8_V4_0WebServicePortType">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <wsdl:operation name="executeRuleset">
    <soap12:operation soapAction="urn:executeRuleset" style="document" />
    <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="testcenter8_V4_0WebServiceHttpBinding" type="ns:testcenter8_V4_0WebServicePortType">
    <http:binding verb="POST" />
    <wsdl:operation name="executeRuleset">
    <http:operation location="testcenter8_V4_0WebService/executeRuleset" />
    <wsdl:input>
    <mime:content type="text/xml" part="executeRuleset" />
    </wsdl:input>
    <wsdl:output>
    <mime:content type="text/xml" part="executeRuleset" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="testcenter8_V4_0WebService">
    <wsdl:port name="testcenter8_V4_0WebServiceHttpSoap11Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap11Binding">
    <soap:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap11Endpoint/" />
    </wsdl:port>
    <wsdl:port name="testcenter8_V4_0WebServiceHttpSoap12Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap12Binding">
    <soap12:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap12Endpoint/" />
    </wsdl:port>
    <wsdl:port name="testcenter8_V4_0WebServiceHttpEndpoint" binding="ns:testcenter8_V4_0WebServiceHttpBinding">
    <http:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpEndpoint/" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Regards
    Nitin

    An update -
    I want to call a web service from my component. The called web service might have different names, therefore I don't want to use the proxy class way.
    I am parsing the WSDL file and obtaining the different parameters. But i am having problem in passing the parameters(receiving as well) to the web service and i am not able to find any good refernce on the internet, i am getting the following exception:
    org.xml.sax.SAXException: Invalid element in javax.xml.rpc.namespace.QName - inputsobj
    at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(Unknown Source)
    at org.apache.axis.AxisFault.makeFault(Unknown Source)
    at org.apache.axis.encoding.DeserializationContextImpl.startElement(Unknown Source)
    at org.apache.axis.message.SAX2EventRecorder.replay(Unknown Source)
    at org.apache.axis.message.MessageElement.publishToHandler(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at org.apache.axis.message.RPCElement.deserialize(Unknown Source)
    at org.apache.axis.message.RPCElement.getParams(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at javaapplication17.Invoke.axisInvoke(Invoke.java:639)
    at javaapplication17.Invoke.parseWSDL(Invoke.java:423)
    at javaapplication17.Invoke.run(Invoke.java:76)
    at javaapplication17.Invoke.main(Invoke.java:64)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    Error invoking service : org.xml.sax.SAXException: Invalid element in javax.xml.rpc.namespace.QName - inputsobj
    at javaapplication17.Invoke.axisInvoke(Invoke.java:639)
    at javaapplication17.Invoke.parseWSDL(Invoke.java:423)
    at javaapplication17.Invoke.run(Invoke.java:76)
    at javaapplication17.Invoke.main(Invoke.java:64)
    Caused by: org.xml.sax.SAXException: Invalid element in javax.xml.rpc.namespace.QName - inputsobj
    at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(Unknown Source)
    at org.apache.axis.encoding.DeserializationContextImpl.startElement(Unknown Source)
    at org.apache.axis.message.SAX2EventRecorder.replay(Unknown Source)
    at org.apache.axis.message.MessageElement.publishToHandler(Unknown Source)
    at org.apache.axis.message.RPCElement.deserialize(Unknown Source)
    at org.apache.axis.message.RPCElement.getParams(Unknown Source)
    ... 7 more
    Following is the code snippet and the passed values to the function:
    Parameters passed to the test function:
    targetNamespace = "http://V5_0.testcenter8"
    serviceName = "testcenter8_V5_0WebServiceHttpSoap11Endpoint"
    portName = "http://V5_0.testcenter8:testcenter8_V5_0WebService"
    operationName = "executeRuleset"
    arrListParameters; //obtained by parsing the XSD using XMLSchema(XSD created from wsdl types tag)
    implURI = "http://192.168.56.89:8080/axis2/services/testcenter8_V5_0WebService?wsdl"
    test function:
    NOTE:some things have been hardcoded.
    public void axisInvoke(String targetNamespace, String serviceName, String portName,
    String operationName, ArrayList<Parameter> arrListParameters, String implURI)
    try
    // first, due to a funny Axis idiosyncracy we must strip portName of
    // it's target namespace so we can pass it in as targetNamespace, localPart
    int index = portName.indexOf(":", portName.indexOf("http://") + new String("http://").length());
    String portNamespace = portName.substring(0, index);
    portName = portName.substring(index == 0 ? index : index + 1); // to strip the :
    javax.xml.rpc.namespace.QName serviceQN = new javax.xml.rpc.namespace.QName(portNamespace, portName);
    org.apache.axis.client.Service service = new org.apache.axis.client.Service(new URL(implURI), serviceQN);
    javax.xml.rpc.namespace.QName portQN = new javax.xml.rpc.namespace.QName(targetNamespace, serviceName);
    // This Call object will be used the invocation
    Call call = (Call) service.createCall();
    // Now make the call...
    System.out.println("Invoking service >> " + serviceName + " <<...");
    //call.setOperation(portQN, operationName); //do not work
    call.setOperationName(new javax.xml.rpc.namespace.QName("http://V5_0.testcenter8", "executeRuleset"));
    call.removeAllParameters();// why there is parameters already added to the list of parameters
    //call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
    ArrayList<Object> arrListInputParameters = new ArrayList<Object>();
    for(int i = 0; i < arrListParameters.size(); i++)
    String strParamName = arrListParameters.get(i).strParamName;
    String strParamType = arrListParameters.get(i).strParamType;
    String strNameSpaceURI = arrListParameters.get(i).strParamNameSpaceURI;
    if(strNameSpaceURI.compareToIgnoreCase("http://www.w3.org/2001/XMLSchema") == 0)
    boolean isInParam = true;
    if(strParamName.compareToIgnoreCase("cabinetName") == 0)
    call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
    arrListInputParameters.add("testcenter8");
    else if(strParamName.compareToIgnoreCase("loginReqd") == 0)
    call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_BOOLEAN, ParameterMode.PARAM_MODE_INOUT);
    arrListInputParameters.add(false);
    else if(strParamName.compareToIgnoreCase("password") == 0)
    call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
    arrListInputParameters.add("D@nger0us");
    else if(strParamName.compareToIgnoreCase("userName") == 0)
    call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
    arrListInputParameters.add("sanjeev");
    else if(strParamName.compareToIgnoreCase("description") == 0)
    call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
    arrListInputParameters.add("Change Address");
    else if(strParamName.compareToIgnoreCase("subject") == 0)
    call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
    arrListInputParameters.add("Credit Card");
    else if(strParamName.compareToIgnoreCase("category") == 0)
    call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
    arrListInputParameters.add("");
    isInParam = false;
    else if(strParamName.compareToIgnoreCase("massRequestType") == 0)
    call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_INTEGER, ParameterMode.PARAM_MODE_INOUT);
    arrListInputParameters.add((int) 1);
    isInParam = false;
    else
    call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
    arrListInputParameters.add("");
    isInParam = false;
    /*if(isInParam)
    call.addParameter(strParamName, org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
    //call.addParameter(strParamName, new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), ParameterMode.PARAM_MODE_INOUT);
    else
    call.addParameter(strParamName, new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), ParameterMode.PARAM_MODE_INOUT);
    /*inputParams = new Object[arrListInputParameters.size() + 1];
    inputParams[0] = "";
    for(int i = 1; i <= arrListInputParameters.size(); i++)
    inputParams[i] = arrListInputParameters.get(i - 1);
    inputParams = new Object[arrListInputParameters.size()];
    for(int i = 0; i < arrListInputParameters.size(); i++)
    inputParams[i] = arrListInputParameters.get(i);
    call.setReturnType(org.apache.axis.Constants.XSD_QNAME);
    //call.setReturnType(org.apache.axis.Constants.XSD_ANYTYPE);
    call.setTargetEndpointAddress(new URL("http://192.168.56.89:8080/axis2/services/testcenter8_V5_0WebService.testcenter8_V5_0WebServiceHttpSoap11Endpoint"));
    Object ret = call.invoke(inputParams);
    System.out.println("Result returned from call to " + serviceName + " -- " + ret);
    System.out.println("Finished");
    catch(java.net.MalformedURLException e)
    System.out.println("Error invoking service : " + e);
    e.printStackTrace();
    catch(javax.xml.rpc.ServiceException e2)
    System.out.println("Error invoking service : " + e2);
    e2.printStackTrace();
    catch(java.rmi.RemoteException e3)
    System.out.println("Error invoking service : " + e3);
    e3.printStackTrace();
    WSDL file:
    WSDL file:
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://V4_0.testcenter8" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax258="http://testcenter8.V4_0.testcenter8/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax257="http://V4_0.testcenter8/xsd" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://V4_0.testcenter8">
    <wsdl:types>
    <xs:schema xmlns:ax260="http://V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8">
    <xs:import namespace="http://V4_0.testcenter8/xsd" />
    <xs:element name="executeRuleset">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="param0" nillable="true" type="ax257:testcenter8_V4_0_Req" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="executeRulesetResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="return" nillable="true" type="ax257:testcenter8_V4_0_Resp" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    <xs:schema xmlns:ax259="http://testcenter8.V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8/xsd">
    <xs:import namespace="http://testcenter8.V4_0.testcenter8/xsd" />
    <xs:complexType name="testcenter8_V4_0_Req">
    <xs:sequence>
    <xs:element minOccurs="0" name="cabinetName" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
    <xs:element minOccurs="0" name="loginReqd" type="xs:boolean" />
    <xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
    <xs:element minOccurs="0" name="password" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="userName" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="testcenter8_V4_0_Resp">
    <xs:sequence>
    <xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
    <xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://testcenter8.V4_0.testcenter8/xsd">
    <xs:complexType name="Inputs">
    <xs:sequence>
    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="subject" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Outputs">
    <xs:sequence>
    <xs:element minOccurs="0" name="category" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="massRequestType" type="xs:int" />
    <xs:element minOccurs="0" name="subCategory" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="executeRulesetRequest">
    <wsdl:part name="parameters" element="ns:executeRuleset" />
    </wsdl:message>
    <wsdl:message name="executeRulesetResponse">
    <wsdl:part name="parameters" element="ns:executeRulesetResponse" />
    </wsdl:message>
    <wsdl:portType name="testcenter8_V4_0WebServicePortType">
    <wsdl:operation name="executeRuleset">
    <wsdl:input message="ns:executeRulesetRequest" wsaw:Action="urn:executeRuleset" />
    <wsdl:output message="ns:executeRulesetResponse" wsaw:Action="urn:executeRulesetResponse" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="testcenter8_V4_0WebServiceSoap11Binding" type="ns:testcenter8_V4_0WebServicePortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <wsdl:operation name="executeRuleset">
    <soap:operation soapAction="urn:executeRuleset" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="testcenter8_V4_0WebServiceSoap12Binding" type="ns:testcenter8_V4_0WebServicePortType">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <wsdl:operation name="executeRuleset">
    <soap12:operation soapAction="urn:executeRuleset" style="document" />
    <wsdl:input>
    <soap12:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="testcenter8_V4_0WebServiceHttpBinding" type="ns:testcenter8_V4_0WebServicePortType">
    <http:binding verb="POST" />
    <wsdl:operation name="executeRuleset">
    <http:operation location="testcenter8_V4_0WebService/executeRuleset" />
    <wsdl:input>
    <mime:content type="text/xml" part="executeRuleset" />
    </wsdl:input>
    <wsdl:output>
    <mime:content type="text/xml" part="executeRuleset" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="testcenter8_V4_0WebService">
    <wsdl:port name="testcenter8_V4_0WebServiceHttpSoap11Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap11Binding">
    <soap:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap11Endpoint/" />
    </wsdl:port>
    <wsdl:port name="testcenter8_V4_0WebServiceHttpSoap12Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap12Binding">
    <soap12:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap12Endpoint/" />
    </wsdl:port>
    <wsdl:port name="testcenter8_V4_0WebServiceHttpEndpoint" binding="ns:testcenter8_V4_0WebServiceHttpBinding">
    <http:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpEndpoint/" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

  • Help needed in designing the Web Service Interface

    Hi,
    In have a scenario where a client will be sending an XML file , which is a SOAP message to a webservice. I would like to know what the input datatype for this interface would be?
    Is the following correct?
    interface MyWebService{
    public String recieveMessage(String aSOAPMessage);
    Also once I get the SOAP message what is the best way to parse or iterate through its contents.
    Any pointers or examples would be highly appreciated.
    Thanks
    Murtuza

    Hi,
    In have a scenario where a client will be sending an XML file , which is a SOAP message to a webservice. I would like to know what the input datatype for this interface would be?
    Is the following correct?
    interface MyWebService{
    public String recieveMessage(String aSOAPMessage);
    Also once I get the SOAP message what is the best way to parse or iterate through its contents.
    Any pointers or examples would be highly appreciated.
    Thanks
    Murtuza

  • Need advice about web services and Java beans

    Hi
    I am very new to web services and to Java beans as well.
    I am trying to understand if and how a web service can use functionality I have in a Java bean. I couldn't find any documentation I can use.
    For example:
    InitialContext ic = new InitialContext();
    Adder adder = (Adder) ic.lookup("ejb/AdderJNDI");In a EJB client project (I'm working with Eclipse) if I add the EJB project to the build path, the Adder interface is recognized.
    Theoritacally I thought I can do the same in a web service server project, but the Adder interface is not recognized.
    Is there something I can read to understand how I need to use the EJB or implement the web service?
    Many thanks
    Sigal

    Okay....I think I made some errors with the original scenario:
    It basically comes down to this....I think. OCS Calendar has a set of Java classes and methods that provide an abstraction for their web services interface. I know how to create something to use these classes using an IDE like JDeveloper, but I'm not sure how that would work with HTML DB.
    I've noticed that the SQL Workshop has a place for Java sources and classes, and I've heard mentions of PL/SQL wrapping. Is there a way to import classes into an HTML DB workspace, wrap 'em up, and access them via PL/SQL?
    Thanks again,
    Jonathan

  • A problem with building a web service with netbeans

    always a problem occurs when i try to build a web service server side.
    build is perfect .but when i said run the project there is an error occurs:
    "Deployment error:null. See the server log file for details."
    error link goes me to this row in the build-impl.xml file of the project:
    <nbdeploy forceRedeploy="${forceRedeploy}" clientUrlPart="${client.urlPart}" debugmode="false"/>
    i am waiting for your help.

    Being a total novice on the https/SSL configuration side of things, I've finally managed to dig down to the fact that our external partner of course needs to have a certificate installed in order to run https.
    I guess the browser did not prompt and ask for acceptance of this, because it was already verified through one of the standard issuers - VeriSign.
    So was then able to export the certificate through IE's Properties>Certificate>Details>Copy To File...
    Will then try to import this into the correct domain on the WebLogic server.
    (A quick test of the web service from the EM console worked fine. Strange then that executing the service through a partner link in bpel does not work, but I guess it may have to do with a local bpel being exposed as a web service in itself, and that security on both sides is called for... maybe... :-) )
    -Haakon-

  • Interfacing web services and RT applications

    [First, sorry to the NI guys who helped me with this over the phone.  It's not that I don't trust your input but in the multitude of counselors there is wisdom.]
    If I want to interface my cRIO real-time control loop with the outside world using web services, how do you implement the interface between the web service and the RT app?  If the RT app is included as part of the web service, will it start running at target boot time or must it be invoked using the web service?

    Aaron--
    What I have now is a web service only application--I only have one Build Specification and it is for the RESTful web service.  I placed what typically would be my RT application code in the web service Source Files section without any URL mappings to go with it.  Then I simply call the top level RT executable code from the web service by static reference and have it return without waiting for code execution to complete.  At this point, my "RT app" is running on the cRIO and can communicate with the web service via functional globals.
    The fact that my "RT app" does not run at boot time is not an issue in this application so I feel like I'm getting by on a special case.  If I needed to run the RT application at boot time with headless operation, I think I would still be having a problem.  I just find it a bit quirky that NI's web services put the developer in the situation that, in order to communicate with an RT executable, they must use shared variables (yuck) or implement a mini virtual network.  Why not put the web service and the RT app into the same application space and be done with it?
    Thanks,
    kc64

  • Which tools build a web service application

    i am a greenhorn in web services.
    i want to build a the example " <INSTALL>/javaeetutorial5/examples/jaxws/helloservice/"
    This are the steps am following
    -open the cmd prompt;
    -type cd C:\Documents and Settings\Guest\Desktop\francis\sun\tutorials\jwstutorial20\jwstutorial20\examples\jaxws\helloservice
    -type asant build
    i get the message : asant is not recognised as a batch command.................
    i get the problem is that i have not set the classpath, but i need to now what builds the web service application or the directory which has the tool.

    If you want to create web service in java then you can use Apache Soap or Weblogic web services using EJBs.

  • Problem starting with jwsdp2.0 to build a web service

    i am using application server 9 and jwsdp2.0 to start building web services but i am finding difficuilties to start. i read the documentation but could not deploy the example web services. Is there any tutorial so that i can write a simple web service and deploy it in the application service right from the scratch.

    Geoffrey,
    Internal Server Error could mean many things. Sometimes just restarting the listner too quickly would cause this error. To make sure that is not the problem. Check the following.
    1) Stop the listener, wait 20 seconds. then restart, do you get the same error?
    2)Apache also gets this error if you have misconfigured either the jserv.properties or the zone.properties. Make sure that you have included the myfirstportlet.jar in jserv.prooereties and it points to the correct location. Also make sure that the location specified in the zone.properties actually points to your NEW provider.xml.
    3) Look in jserv.log and mod_jserv.log within Apache\Jserv\logs. Do you have any error messages?
    4) Can you call http://host.domain/servlet/IsItWorking
    This is a sample servlet that comes with Jserv. If this works, then Jserv is working and something is specifically wrong with myfirstportlet. If this sample does not work, then you have misconfigured something in the files and all of Jserv is not working.
    Hope this helps,
    Sue

  • Web services and JPA - not a good mix?

    Hi!
    Sorry if this question isn't web services specific, but this forum is the closest I've found here at SDN.
    I'm having a bad time trying to figure out how to use JPA and web services in the same application.
    Problems is, some of my entities contains binary data, and instances of those entities are members of other entities. If I'm correct, that is an enormous waste of memory on the server side, and worse, I need to transmit some of those entities via web services so the resulting SOAP message will be really huge. See the example below:
    @Entity
    public class A {
      @Id
      private Integer id;
      private byte[] data;
    @Entity
    public class B {
      @Id
      private Integer id;
      @ManyToOne
      private A a1;
      @ManyToOne
      private A a2;
    public static void main(String[] args) {
      A a = new A("huge_data.avi");
      B b = new B();
      b.a1 = a;
      b.a2 = a;
      WebService.send( b ); //TWO identical "huge_data.avi" sent down the wire
    }From what I've read from other forums, setting the fetch type to "LAZY" in the binary data is problematic since the entities will be dettached and serialized into SOAP messages.
    Is JPA the right choice in this case? I could drop JPA and begin to use JDBC (and use "id"s instead of full object references) but some of the benefits of JPA would be wasted. See how it would become:
    @Entity
    public class A {
      @Id
      private Integer id;
      private byte[] data;
    @Entity
    public class B {
      @Id
      private Integer id;
      private Integer a1Id;
      private Integer a2Id;
    public static void main(String[] args) {
      A a = new A("huge_data.avi");
      B b = new B();
      b.a1Id = a.id;
      b.a2Id = a.id;
      WebService.send( a, b ); //Fine now, but all "A" objects would need to be sent as a separated list.
    }Sadly, almost every example out there on the web about JPA+web services is very simplified to be of any real usage.
    Please, help me. Thanks a lot.

    This will get rid or your ant problem. This stuff really works. You put a few drops of the liquid on a little piece of paper and you will see TONS of them come and eat it. They take it back to their colony and it kills them all. The next day they are all gone. It's that quick.
    http://www.terro.com/
    -Bmer
    Mac Owners Support Group
    Join Us @ MacOSG.com
     An Apple User Group 
        MacOSG Podcast >>
    Note: I receive no compensation for product endorsements.

  • Java Web Services and hosting companies

    Hi
    At this moment I am looking for a web hosting companies.
    I will be developing website in Java and I will also develop Web Services.
    Can you tell if I am able to host Web Services with any hosting company that supports Java. Or is there any special requirement on the behalf of the hosting companies to support Web Services written in Java
    regardas

    No Problem at all
    Nomally the Web Service is big different between Web application. or you can build your Web service structure like web application structure. It depends on the web server:
    If the Web Server of hosting company has WEB Service framework, you just need know how to deploy your Web service to Web Service framework and How to deploy to Web Server. In this case, you need deploy it two time, one is for Web Server framework and one is for Web Service framework
    If the Web Server of hosting company doesn't has WEB Service framework, you need build your own Web Service framework into a web application, then you just need know how to deploy your web application with Web service into Web Server framework

  • Web Services and Internal Tables.

    Hi.
    In the next days I will need to create a program to consume a Web Service that is going to return data like an internal table, I mean...
    Field1a | Field2a | Field3a
    Field1b | Field2b | Field3b
    Field1c | Field2c | Field3c
    Do you have any ABAP example of consuming a Web Service and receiving data into an internal table?
    Thanx in advanced.
    Edited by: urjose on Jun 19, 2008 8:47 PM

    Hello,
    Maybe this links will give you a hint.
    /people/thomas.jung3/blog/2005/01/05/develop-a-web-service-that-sends-an-email--in-abap
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/ae1b9a5d2cef4ea4b579f19d902871/content.htm
    Bye
    Gabriel P.-

  • Need clarifications on NB Web services

    Hi All,
    We are trying to utilize the web services exposed by the CPO 3.0. However we are stuck with following topics/questions and not able to move forward. The intention of this, is basically to trigger/observe/stop/review activities from a custom portal similar to Cisco Prime catalog. We have referred NB Web Services guide, but it doesn't explain in detail
    Process Level - How to accomplish a custom web service (Our definition of custom is a feature offered as part of CPO but not available as a web service) along with the guidelines of parameterizing techniques which is not been elaborated in the NB_Web Services Guide (available online along with WSDL).Example - Guidelines to create a new web service Process by name startUpdateDatabase(parameter1, parameter2,…... parameter n)
    Instance Level - Development documentation of web service which can give the exact node status of the current instance runningAnticipated return statement similar to currentExecutionNode - (node n) where n is the node ID/name of the requested instance
    Tasks Level - Lifecycle documentation associated to tasksExample - ItilStatus(ItilTaskStatus) - Status of Task (New, assigned, pending, InProgress ….. Etc.,) - Understanding of the complete lifecycle but not just parameters. How to obtain?
    Sample code to perform tasks like InputTask and ApprovalTask which involves user effort (say, approving an action) using web services and when the task is performed by an user, the status of the flow of information changes from assigned to completed.
    Are there any Web Services development guide with examples(Apart from NB Web Services Guide)?
    Any help would be much appreciated . 
    Thank you!
    Regards,
    Eswar

    ok... I'll give it a whirl.
    As a side note, you should be able to use something like SOAP UI if you are trying to easily form the calls. You can use SOAP UI and connect to whatever WSDL in the NBWS you want and it will give you all the methods and you can create sample calls and try them out. This is shown quite a bit in my blogs. For web service work, my blogs are a great place to start.
    Process Level - I believe what you are asking here is how to get something to start via NBWS? In 3.0 you must add the trigger "Started by Web Service". There you can configure the exposed name/method for that web service. After saving your process you must refresh/bounce the web services and then your process will show up in the process WSDL (by default: http://host:port/WS/Process?WSDL). You can then make calls to it.
    I believe you are asking how to find the status of a current process? Or are you asking about the exact status of a CPO node in the cluster? If it's the process, you can use the process instance WSDL @ http://hostname:port/WS/ProcessInstance?WSDL. If you are asking about finding the status of a CPO node, then you can query the DB for that or you could just use the windows activity "Query Service" and query for the CPO Service to be running. You would have to write this yourself but it's quite easy. (in fact I probably have a blog showing it somewhere) There is *NO* webservice to give back the status of a CPO node's service
    Not sure what you are asking about tasks. You can use the NBWS for them in http://host:port/WS/Task?WSDL . The lifecycle of a tasks should meet that of the ITIL model as that is what CPO is patterned after. We do not offer training on this lifecycle, that would be something you would fine with ITIL training. Many of the customers (who are not ITIL trained) only use a couple of status and go with it because it means something to them. IE. Some only used CLOSED to close out tasks, but some used RESOLVED. It's really up to end user determination.
    I would create the task via web service and then update it with the proper information. Again, like I mentioned above, if you need to see samples or the layout of one, then use SOAP UI. It will give you a template layout and then you can fill in the required information. We do not have a sample of every single web call we produce. (since SOAP UI does such a great job) You can also use the WEB SERVICE EXECUTE activity inside of CPO and this gives you inputs to do it directly (although does not give you the soap message like SOAP UI does)
    No. The NBWS guide is it. Use SOAP UI as per above. I have done a numerous amount of blogs that have some information in them and have some examples, but I have not done everything because the use case has not crossed my desk.
    If you have more pointed use case and what exactly you are trying to do we can go into further detail maybe, but the above is a good start.
    --Shaun

  • Web services and wsdl for beginners

    Hi, I wonder if someone could help me, I need a guide on how to create, consume and publish web services and wsdl in jboss for beginners, using the tools of eclipse or netbeans.
    Thank you very much

    My intention is to create web services to consume from PDF forms, I thought it was the right way from eclipse, this is good practice or is there a better way?
    Thanks.

  • Help! Invoking the same Web Service from multiple mxml components

    Hi,
    I'm building an application that interacts with a Web Service.  The application (App A) has a tabNavigator with two tabs (Tab1 and Tab2).  Tab1 contains a custom component (Comp A) and Tab2 contains another custom component (Comp B). Tab1 is the first tab, and Tab2 is the second tab.
    Comp A and Comp B each handles the "creationComplete" event by invoking an operation, Op1,  of the Web Service.
    The problem is, when App A starts up, Comp B can successfully invoke Op1 in its creationComplete handler, but Comp A cannot.  In fact, Comp A's call to Op1 does not return.  Comp A is created before Comp B.
    If the application has only one tab (either Tab1 or Tab2), each Comp can successfully invoke Op1 at application start-up.
    Comp A and Comp B each has its own declaration section for the Web Service and CallResponder for Op1.
    I'm using the trial version of Flex Builder 4 and new to flex application development.  Any help in debugging this problem would be greatly appreciated.
    Much thanks,
    --Hyong

    I've been shown by a colleague (who is more experienced in .Net than am I) that this can be achieved by adding the target web service's WSDL to my invoking web service as a Web Reference.  The original logic I was using, though working from VB 6 and Active Server Pages, can be simplified through the use of the WSDL definition for implementation in .Net.
    Thank you for your responses,
    -- Chris

  • Problem with MDM web services and webdynpro

    Hi MDMguru,
    I have created web services from SDN example: it reads the MDM version.
    If I use J2ee Navigator Web Services and I try  mywebservices, it works very well.
    I have created a webdynpro (from this SDN Example https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating%20an%20email-client%20using%20web%20dynpro%20and%20web%20services.pdf).
    I have followed step by step the example.
    But when run webdynpro and it calls my webservices it not works because it throws this exception:
    javax.xml.rpc.soap.SOAPFaultException: Exception in method getVersion. , Debug ,  , com.enel.sap.ws.component.WSComponent.VersionMDM , sap.com/tcwddispwda , J2EE_GUEST
    Can someone help me?

    It appears that %ROWTPYE is not supported directly, and that we need to create a TYPE to wrap the return data
    Thanks to Marc Thompson for the details (http://marc-on-oracle.blogspot.co.uk/2007/12/11g-database-installation-and-native.html)
    PD

Maybe you are looking for

  • Apparently, BT are capping me even though I'm not ...

    Hey there, Recently I have been getting really slow speeds during peak times, I know you'll say "Thats what is meant to happen" and I know it is but my internet is going so slow that I can't load YouTube videos and play on Xbox LIVE from around 5:20p

  • Priority for Automatic Proccesses in Oracle BPM 10.3

    Hi, I'm completely new to the BPM space, and I was just transferred to a team that's using Oracle BPM 10.3, so my apologies if this is a trivial question. Does anyone know how to implement priority for automatic activities in Oracle BPM 10.3? Basical

  • Help! Refresh default tabbed panel

    Hi, I have a problem with my spry tabbed panels. The default tab is set to be the 1st tab, when I move to 2nd tab and navigate through the content, as the page refreshes, and before it is fully loaded it shows the content of the first tab for about 2

  • Problems with Flexible Parameter Passing - Can anyone help with the answer

    Hi, having gone to the trouble of creating a generic form handler which utlises the ability of the PL/SQL Gateway to handle flexible parameters, we've come across an almighty problem. Whilst the gateway will create two arrays of parameter names and v

  • Deleted by MMS Adaptation

    I am able to successfully send MMS messages from an iPhone 3G after applying the most recent carrier update. However, any message that I receive that contains either a picture and/or video is received with the message "One or more of the message comp