Hard-coding complex type web service parameter

Hi,
I am trying to populate a drop-down list with data returned from a web service. The web service requires one parameter, but it is a complex type with many elements. I don't need any user input, I want to set the the parameter values programatically. Is this something that can be done with a web service data control?
I know that I can edit the action binding and specify a parameter, but I'm not sure how to do this when the parameter is a complex type.
I hope I am explaining this in a way that makes sense. I am fairly new to both Jdeveloper and web services.
I am using JDeveloper 11.1.2.0.0
Thanks.

Thanks for the link. The article is from 2006 and I was under the impression that there was more support for complex types now. Maybe in my case I am better off using a web service proxy?

Similar Messages

  • Complex Types & Web Services

    Portal 7 allows you to create portlets from WSDL files. I have a web
    service that has an interface which returns a org.w3c.dom.Document. The
    portlet wizard won't generate code from this interface since it uses a
    "complex type". Is there any way to allow this type of generation other
    than hand coding all the wsdl_*.java files in the jar file?
    kwc

    JAXB can be used to solve your problem. Rather than trying return your own types directly use JAXB to explain your return types in a schema;
    Example:
    public class MyType {
    int id=-1;
    int noOfObjects=0;
    String something;
    @XmlElement(nillable = true) //Java annotation to return list
    List<String> participant;
    public Interaction() {
    participant= new ArrayList<String>();
    something=�hi�;
    public List<String> get() { return participant; }
    public void set(String newpart) {participant.add(newpart);}
    public String getCrux() { return �OK�; }
    public void setCrux(String something) { this. something = something; }
    @XmlAttribute
    public int getId() { return 0; }
    public void setId(int id) {  }
    @XmlAttribute
    public int getNoOfObjects() { return noOfObjects; }
    public void setNoOfObjects(int id) { this.noOfObjects =noOfObjects; }
    @WebService()
    public class MyService {
    @WebMethod
    public Results MyType (@WebParam(name = "id") String id) {
    return new MyType();
    When defining your own class make sure you have "get" and "set" methods for all types.(JAXB needs this)

  • Urgent: Calling a WebLogic document type Web Service

    We have created an one-way, document type web service that works fine with the
    clientgen client. When sending the same SOAP message to the service from another
    client, it fails with: javax.xml.soap.SOAPException: failed to receive message:
    The other client recieves an HTTP 500.
    The signature for the service method is:
    public void getDiag(Diagnostic diag)
    Diagnostic is a complex type generated by autotype from a schema.
    The failing client builds the SOAP message and sends it to the WebLogic service
    using HttpURLConnection with the request method set to POST and content-type to
    text/xml.

    Is there any error on the server?
    Did the method on the end componet invoked?
    If you are using WLS 8.1, its better to use SAAJ
    instead of plain http url connection. Something like:
    SOAPConnectionFactory factory =
    SOAPConnectionFactory.newInstance();
    SOAPConnection connection =
    factory.createConnection();
    SOAPMessage response =
    connection.call( request, targetURL );
    Here is a working example:
    http://manojc.com/?sample23
    RouterHandler.java
    Regards,
    -manoj
    http://manojc.com
    "Steve Watson" <[email protected]> wrote in message
    news:3ec13eeb$[email protected]..
    >
    We have created an one-way, document type web service that works fine withthe
    clientgen client. When sending the same SOAP message to the service fromanother
    client, it fails with: javax.xml.soap.SOAPException: failed to receivemessage:
    >
    The other client recieves an HTTP 500.
    The signature for the service method is:
    public void getDiag(Diagnostic diag)
    Diagnostic is a complex type generated by autotype from a schema.
    The failing client builds the SOAP message and sends it to the WebLogicservice
    using HttpURLConnection with the request method set to POST andcontent-type to
    text/xml.

  • Need help with DOC type web service

    hi,
    I am trying to write a simple message style ( doc type ) web service but no success so far. I have tried to search for examples but no use. I already implemented some simple RPC style web services like calculator etc and able to use them. I am more interested in the DOC type ( which sends SOAP message and receives SOAP message back). Can Anybody give me an example for implementing this type of service ( very-simple say HellowWorld ) or point me to some website . I am not able to generate the response envelope. I can write the client program which will send a SOAP Envelope to this services with one parameter NAME and the services should return Hello Name but in a SOAP envelope form. I can create a SOAP message in this Client using SOAPConnection and MessageFactory etc. Your help will be really appreciated. There is very little stuff about webservices on the internet as well on this forum.
    Thanks
    Vinod

    Hello kwilding2,
    Thanks for the quick response and pointing to some useful websites. I downloaded the code from web service essentials BUT all the examples are using SOAP RPC calls. They create a call object and call one of the service methods and a response is returned. I am little confused about this stuff. I am looking for something which returns the response in a SOAP envelope for which i think i need to use JAXM API which I already have downloaded. I have created a client which composes a SOAP envelope using SOAPConnection and other MessageFactory classes etc and can send this SOAP envelope to a web service. In return I want the web service to give the SOAP envelope.
    I have gone thru xmethods.net and picked the following stock quote request and response:
    Sample Request envelope:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:getQuote xmlns:ns1="urn:xmethods-delayed-quotes" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <symbol xsi:type="xsd:string">IBM</symbol>
    </ns1:getQuote>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Sample Response Envelope:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:getQuoteResponse xmlns:ns1="urn:xmethods-delayed-quotes" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xsi:type="xsd:float">133.625</return>
    </ns1:getQuoteResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    I also want the things in this order. This webservice at xmethods just returns the price for a stock, so how they say it returns this Response Envelope. Is this Envelope something implied. I am getting more confused.
    any help will be appreciated.
    Thanks
    Vinod

  • Test Connection fails for VC system of type Web Service

    Hi All
    I ve created a VC system of the type Web Service in Portal. In this VC system, I have given Url of the Enterprise Service that I want to use in VC.
    (for eg: http://erp.esworkplace.sap.com/sap/bc/srt/wsdl/sdef_ECC_SALESORDER002QR/wsdl11/ws_policy/document?sap-client=800)
    In the next step, I did user mapping for the VC user that will be consuming this Enterprise Service.
    The system was created successfully but when I did ‘Connection Tests’ , I got the following exception:
    “Test Details:
    The test consists of the following steps:
    1. Retrieve the default alias of the system
    2. Check the connection to the backend application using the connector defined in this system object
    Results
    Retrieval of default alias successful
    Connection failed. Make sure that Single Sign-On is configured correctly”
    Do I need to do any more configurations before I can use such ES portal system in my VC work studio ?
    I understand that I have provided little information about the exception thrown by Portal.
    I kindly request you to feel free in asking any other details about the same.
    Regards
    Kapil S Kamble

    Hi Natty
    thanks for your immediate reply.
    I followed your instructions and created iView of the type URL and set the fetch mode property to 'server side' as told.
    Initially, I gave 'http://www.sap.com' as the Url and I was successful in opening the site.
    Later, when I gave Enterprise Service url and tried to preview the iView, I got the following exception:
    *'http://erp.esworkplace.sap.com/sap/bc/srt/wsdl/sdef_ECC_SALESORDER002QR/wsdl11/ws_policy/document?sap-client=800
    Error # 401'*
    I ll need to give username and password. But how do i give them as parameters?
    Please note, these parameteres are appended to the Url. So, I fear that if url of Enterprise service is changed, then it wont open.
    what do you think ?
    Kapil

  • Error: Error #2170  Connection Type: Web Service

    Hi all,
    In BO I have changed the external address on DNS say abc.com
    Now when I try to access the dashboard internally it gives the error trying to access xyz.com which was previous external ip.
    The error I get is
    To access external data, add a cross-domain policy file to the external data web server.
    For more information, on the Adobe website, see the article "Cross-domain Policy File Specification".
    If the problem persists, contact the file creator or your system administrator.
    Error: Error #2170
    Connection Type: Web Service
    File URL: http://abc.com...
    External Data URL: http://xyz.com...."

    May be in connections, you have hardcoded the server as xyz.com. It is always advisable to use relative url so that the servername and port is resolved in runtime.
    Also, check in CMC > Applications > Web Service > Properties what is the server name specified ? Is it still the old one ?

  • Do we need the Loadrunner vuser type "web services"?

    We are planning to benchmark XI 3.1 using Load runner scripts.
    Do we need the Loadrunner vuser type "web services" to benchmark XI 3.1 with SAP Portal, Infoview, Xcelsius, Live Office, and QAAWS?
    NOTE: Our customer is using Xcelsius Dashboards against WebIntelligence latest Instances.
    Regards,
    - Gabriel

    Apache is a webserver, Tomcat is a "servlet-container", which it not a webserver. For fast setup, you can develop your Java-web-app with only Tomcat, which saves you the hassle of configuring AJP13 connectors... But they are significantly different....

  • Cannot send complex type as method parameter

    Cannot send complex type as method parameter
    Hi!
    I'm using a kSOAP 1.2 client and i'm having trouble executing a method that takes an object
    of complex type as parameter:
    method:
    public void addSquareDetail(SquareDetail sd){/stuff}
    -SquareDetail is a java bean class that implements KvmSerializable
    - a mapping was added to classmap
    -legacy namespace is not an issue (i AM able to execute the following methods successfully
    over kSOAP):
    -getting one SquareDetail object
    -getting a vector of squareDetail objects
    Here's how i'm trying to call the 'send' method:
         ClassMap classMap = new ClassMap();
    classMap.addMapping("urn:SquareWebService/types", "SquareDetail", (new
    SquareDetail()).getClass());
    System.out.println("add one SquareDetail");
    request = new SoapObject(serviceURN, "addSquareDetail");
    sd = new SquareDetail();
    request.addProperty("SquareDetail_1", sd);
    tx = new HttpTransport(this.endPointURL, "addSquareDetail");
    tx.debug = true;
    tx.setClassMap(classMap);
    tx.call(request); //exception here
    (above:)
    private String endPointURL = "http://localhost:8080/SquareWebService/SquareWebService";
    protected static final String serviceURN = "urn:SquareWebService/wsdl";
    Error(from server, Sun ONE App Server7):
    SoapFault - faultcode: 'env:Server' faultstring: 'Internal Server Error (deserialization
    error: unexpected XML reader state. expected: END but found: START: someInt)' faultactor:
    'null' detail: null
    Here are request/response dumps:
    -request---------
    <SOAP-ENV:Envelope xmlns:n0="urn:SquareWebService/types"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <addSquareDetail xmlns="urn:SquareWebService/wsdl" id="o0" SOAP-ENC:root="1">
    <SquareDetail_1 xmlns="" xsi:type="n0:SquareDetail">
    <someFloat xsi:type="SOAP-ENC:float">1.5</someFloat>
    <someInt xsi:type="xsd:int">-1</someInt>
    <someString xsi:type="xsd:string">someString from SquareDetail</someString>
    <propertyCount xsi:type="xsd:int">4</propertyCount>
    </SquareDetail_1>
    </addSquareDetail>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    response------------
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:SquareWebService/types"
    xmlns:ns1="http://java.sun.com/jax-rpc-ri/internal"
    env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><env:Fault><faultcod
    e>env:Server</faultcode><faultstring>Internal Server Error (deserialization error:
    unexpected XML reader state. expected: END but found: START:
    someInt)</faultstring></env:Fault></env:Body></env:Envelope>
    So, apparently, the request message is not understood by the server. what exactly is it
    missing, and how can i add/correct that? (my guess in SquareDetail_1 xmlns="" should be
    "urn:SquareWebService/types", although it's just a guess AND i don't know how to make kSOAP
    get it in there)
    I'm not sure what kind of SOAP parser my app server utilizes, but i'm guessing it's an
    apache product (how can i tell?). I also have a WSDL file available, should anyone be
    willing to look at it, please let me know
    thanks
    -nikita

    Don't know if it will help but Can you check if the serializable object has a public empty no args constructor with an empty call to super()
    Also make sure that a type mapping registry is added with a reference to the serializable object in it.
    Please paste The WSDL as well

  • Web service: parameter types

    Hi,
    We made an ABAP webservice with input parameters.
    In the WSDL the type of the parameters is:
    - <wsdl:message name="ZTestWebService2">
    <wsdl:part name="Costcenter" type="n0:char10" />
    The type ‘char10’ is defined like:
    - <xsd:simpleType name="char10">
    - <xsd:restriction base="xsd:string">
      <xsd:maxLength value="10" />
      </xsd:restriction>
      </xsd:simpleType>
    Question is: is there a way to influence the creation of this types, so that the type is not referring to ‘n0:char10’ but to something like ‘char’ and that the length is also defined in the part name ? Something that is more Java friendly and will not create code for complex types on the client-side ?
    Thanks,
    Rolf.

    HI,
    No u cant change this parameter dynamically after the release of web service.
    When u will release the webservice for a RFC,the WSDL file will be generated.That time it will generate the files for every parameter types which are used in the RFC.
    If u want increase this value length,Then u hv to increase the lenght of the parameter in RFC and then release the web service.So that it will come here.
    Bcause in webservice lenght will not allow more that the lenghth which u gave in RFC.
    Regs
    Manas Ranjan Panda

  • Web Service Parameter error

    Please help me, I'm too much lost because I can not pass ParameterFields to the CrystallReportViewer, It always give me the error
    "Object reference not set to an instance of an object."
    Only simple report and only one ParameterFields . Nothing else:
    The code I pass parameter is copied from the MSDN help as the following:
    public partial class Form1 : Form
    public Form1()
    InitializeComponent();
    private void Form1_Load(object sender, EventArgs e)
    crystalReportViewer1.ReportSource =
    "http://localhost/ec/reports/CrystalReport1Service.asmx";
    try
    SetParameterFieldInfo("x1", "xxxx");
    catch (Exception)
    throw;
    private void SetParameterFieldInfo(String fieldName, String fieldValue)
    CrystalDecisions.Shared.ParameterDiscreteValue parameterDiscreteValue = new CrystalDecisions.Shared.ParameterDiscreteValue();
    parameterDiscreteValue.Value = fieldValue;
    CrystalDecisions.Shared.ParameterValues currentParameterValues = new CrystalDecisions.Shared.ParameterValues();
    currentParameterValues.Add(parameterDiscreteValue);
    CrystalDecisions.Shared.ParameterField parameterField = new CrystalDecisions.Shared.ParameterField();
    parameterField.Name = fieldName;
    parameterField.CurrentValues = currentParameterValues;
    //if (parameterField.HasCurrentValue)
    // MessageBox.Show(parameterField.);
    CrystalDecisions.Shared.ParameterFields parameterFields = new CrystalDecisions.Shared.ParameterFields();
    parameterFields.Add(parameterField);
    crystalReportViewer1.ParameterFieldInfo = parameterFields;
    As you can see from the above code it is very straight. I always get the following exception:
    at CrystalDecisions.Windows.Forms.ParameterFieldInfo.get_isDCP()
    at CrystalDecisions.Windows.Forms.ParameterValueEditControl.Start()
    at CrystalDecisions.Windows.Forms.ParameterUnit.AddEditControl(ParameterValue pv)
    at CrystalDecisions.Windows.Forms.ParameterUnit.UpdateControls()
    at CrystalDecisions.Windows.Forms.ParameterUnit.set_ParameterFieldInfo(ParameterFieldInfo value)
    at CrystalDecisions.Windows.Forms.InteractiveParameterPanel.ShowParameters()
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.ShowInteractiveParameters()
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.ShowReport()
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.OnPaint(PaintEventArgs evtArgs)
    at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region transparentRegion)
    at System.Windows.Forms.ToolStrip.EraseCorners(PaintEventArgs e, Region transparentRegion)
    at System.Windows.Forms.ToolStrip.OnPaintBackground(PaintEventArgs e)
    at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
    at System.Windows.Forms.Control.WmPaint(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    at System.Windows.Forms.ToolStrip.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.SafeNativeMethods.UpdateWindow(HandleRef hWnd)
    at System.Windows.Forms.Control.Update()
    at System.Windows.Forms.ToolStrip.ClearAllSelectionsExcept(ToolStripItem item)
    at System.Windows.Forms.ToolStrip.NotifySelectionChange(ToolStripItem item)
    at System.Windows.Forms.ToolStripItem.Select()
    at System.Windows.Forms.ToolStrip.ChangeSelection(ToolStripItem nextItem)
    at System.Windows.Forms.ToolStrip.SelectNextToolStripItem(ToolStripItem start, Boolean forward)
    at System.Windows.Forms.ToolStrip.Select(Boolean directed, Boolean forward)
    at System.Windows.Forms.Control.SelectNextControl(Control ctl, Boolean forward, Boolean tabStopOnly, Boolean nested, Boolean wrap)
    at System.Windows.Forms.ContainerControl.Select(Boolean directed, Boolean forward)
    at System.Windows.Forms.Control.SelectNextControl(Control ctl, Boolean forward, Boolean tabStopOnly, Boolean nested, Boolean wrap)
    at System.Windows.Forms.Control.SelectNextControlInternal(Control ctl, Boolean forward, Boolean tabStopOnly, Boolean nested, Boolean wrap)
    at System.Windows.Forms.Form.set_Active(Boolean value)
    at System.Windows.Forms.Form.WmActivate(Message& m)
    at System.Windows.Forms.Form.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
    at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
    at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
    at System.Windows.Forms.Control.set_Visible(Boolean value)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.Run(Form mainForm)
    at testItemCard.Program.Main() in C:\Users\Tariq\Documents\Visual Studio 2008\Projects\testItemCard\testItemCard\Program.cs:line 18
    at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    Then the report is diplayed propably and the parameters is passed to it but I want to avoid this exception
    Please help me to figure out what is wrong, I can send parameters to ReportDocument but when the ReportSource is a Web Service (asmx) It always raise.
    For mor explaination:
    1- I create a report which has only one string field.
    2- The report has only one parameter string olso.
    3- I place the parameter in the page header.
    4- I create a new Crystal Reports Web Site from Visual Studio 2008.
    5- I add the report to the web site.
    6- I right click the report and choose "Publish as a web service"
    7- I create a windows forms application with CrystalReportViewer1
    8- In the form load I set the report source to the auto generated web service using this code only
    crystalReportViewer1.ReportSource = "http://localhost/ec/reports/CrystalReport1Service.asmx";
    Then I run the application.
    CR shows the parameters dialog then raises the exception.
    Also if i send the parameter using the crystal report viewer it gives the same exception!!!
    My question is If somebody try the steps above then tell me whether the exception is raised in his computer?
    Should I make special settings?
    Please help me. It is very simple steps. Just do it and tell me the results.
    Thanks in advance.

    I got the following with CR2008 SP2 .NET Runtime on Portuguese Windows 2003. It works fine on English OS though.  It seems to be the same issue. The reprot is still displayed, but the ToolBar has a red cross and is not usable. Is there an answer yet?
    EXCEPTION >>
    NullReferenceExceptionMessage: Referência de objeto não definida para uma instância de um objeto.
    Source: CrystalDecisions.Windows.Forms
    TargetSite: Boolean get_isDCP()
    StackTrace:
       em CrystalDecisions.Windows.Forms.ParameterFieldInfo.get_isDCP()
       em CrystalDecisions.Windows.Forms.ParameterValueEditControl.Start()
       em CrystalDecisions.Windows.Forms.ParameterUnit.AddEditControl(ParameterValue pv)
       em CrystalDecisions.Windows.Forms.ParameterUnit.UpdateControls()
       em CrystalDecisions.Windows.Forms.ParameterUnit.set_ParameterFieldInfo(ParameterFieldInfo value)
       em CrystalDecisions.Windows.Forms.InteractiveParameterPanel.ShowParameters()
       em CrystalDecisions.Windows.Forms.CrystalReportViewer.ShowInteractiveParameters()
       em CrystalDecisions.Windows.Forms.CrystalReportViewer.ShowReport()
       em CrystalDecisions.Windows.Forms.CrystalReportViewer.OnPaint(PaintEventArgs evtArgs)
       em System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
       em System.Windows.Forms.Control.WmPaint(Message& m)
       em System.Windows.Forms.Control.WndProc(Message& m)
       em System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       em System.Windows.Forms.ContainerControl.WndProc(Message& m)
       em System.Windows.Forms.UserControl.WndProc(Message& m)
       em CrystalDecisions.Windows.Forms.CrystalReportViewer.WndProc(Message& msg)
       em System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       em System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       em System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    Edited by: Frank88 on Oct 31, 2009 1:06 AM
    Edited by: Frank88 on Oct 31, 2009 1:16 AM

  • JAX-rpx document literal type web services

    I was trying to create a Document centric Web service. I followed all the steps in the document "Patterns and Designs for Building Document based Web Services" available at java.sun.com. I created the XSD's and WSDL files (top down approach). i used the following command of wscompile tool to generate the java source code.
    wscompile -import -d build/classes -keep -s build/src -model build/model.xml.gz
    to publich the web service on a server.
    When the tool generates the code, the parameters for the method are the elements of the schema, instead of being an object, specified in the WSDL.
    // This class was generated by the JAXRPC SI, do not edit.
    // Contents subject to change without notice.
    // JAX-RPC Standard Implementation (1.1.2_01, build R29)
    // Generated source version: 1.1.2
    package com.galaxyplus.tranentry.services;
    public interface IPurchaseOrder extends java.rmi.Remote {
        public com.galaxyplus.tranentry.services.PurchaseOrderStatus acceptPO(com.galaxyplus.tranentry.services.Address billTo, java.util.Calendar createDate, com.galaxyplus.tranentry.services.LineItem[] items, java.lang.String poID, com.galaxyplus.tranentry.services.Address shipTo) throws
             java.rmi.RemoteException;
    }It was supposed to be
    // This class was generated by the JAXRPC SI, do not edit.
    // Contents subject to change without notice.
    // JAX-RPC Standard Implementation (1.1_03, build R65)
    package com.examples.docliteral;
    public interface IPurchaseOrder extends java.rmi.Remote {
        public com.examples.docliteral.PurchaseOrderStatus
             acceptPO(com.examples.docliteral.PurchaseOrder parameters) throws
                 java.rmi.RemoteException;
    }Does any one have any inputs on this. I am using the same example as in the Document.
    Thanks

    More Information
    PurchaseOrder.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2005 sp1 U (http://www.xmlspy.com) by Dan Carnell (Fiserv) -->
    <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="uri:X" targetNamespace="uri:X">
         <element name="PurchaseOrderDocument" type="tns:PurchaseOrder"/>
         <complexType name="Address">
              <sequence>
                   <element name="street" type="string" nillable="false"/>
                   <element name="city" type="string" nillable="false"/>
                   <element name="state" type="string" nillable="false"/>
                   <element name="zipCode" type="string" nillable="false"/>
              </sequence>
         </complexType>
         <complexType name="LineItem">
              <sequence>
                   <element name="itemname" type="string" nillable="false"/>
                   <element name="price" type="decimal" nillable="false"/>
                   <element name="quantity" type="int" nillable="false"/>
              </sequence>
         </complexType>
         <complexType name="PurchaseOrder">
              <sequence>
                   <element name="billTo" type="tns:Address" nillable="false"/>
                   <element name="createDate" type="dateTime" nillable="false"/>
                   <element name="items" type="tns:LineItem" nillable="false" minOccurs="0" maxOccurs="unbounded"/>
                   <element name="poID" type="string" nillable="false"/>
                   <element name="shipTo" type="tns:Address" nillable="false"/>
              </sequence>
         </complexType>
    </schema>Status.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="uri:X" targetNamespace="uri:X">
         <element name="Status" type="tns:PurchaseOrderStatus"/>
         <complexType name="PurchaseOrderStatus">
              <sequence>
                   <element name="orderid" type="string" nillable="false"/>
                   <element name="timestamp" type="string" nillable="true"/>
              </sequence>
         </complexType>
    </schema>Abstract.wsdl
    <!-- edited with XMLSpy v2005 sp1 U (http://www.xmlspy.com) by Dan Carnell (Fiserv) -->
    <definitions xmlns:tns="urn:poservice" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="uri:X" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    targetNamespace="urn:poservice" name="POService">
         <types>
              <xs:schema>
                   <xs:import namespace="uri:X" schemaLocation="PurchaseOrder.xsd"/>
                   <xs:import namespace="uri:X" schemaLocation="Status.xsd"/>
              </xs:schema>
         </types>
         <message name="IPurchaseOrder_acceptPO">
              <part name="parameters" element="ns1:PurchaseOrderDocument"/>
         </message>
         <message name="IPurchaseOrder_acceptPOResponse">
              <part name="result" element="ns1:Status"/>
         </message>
         <portType name="IPurchaseOrder">
              <operation name="acceptPO">
                   <input message="tns:IPurchaseOrder_acceptPO"/>
                   <output message="tns:IPurchaseOrder_acceptPOResponse"/>
              </operation>
         </portType>
    </definitions>poservice.wsdl
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns:tns="urn:poservice"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    targetNamespace="urn:poservice" name="POService">
         <import namespace="urn:poservice" location="Abstract.wsdl"/>
         <binding name="IPurchaseOrderBinding" type="tns:IPurchaseOrder">
              <soap:binding style="document"
                             transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="acceptPO">
                   <soap:operation/>
                   <input>
                        <soap:body use="literal"/>
                   </input>
                   <output>
                        <soap:body use="literal"/>
                   </output>
              </operation>
         </binding>
         <service name="POService">
            <port name="IPurchaseOrderPort" binding="tns:IPurchaseOrderBinding">
              <soap:address location="http://127.0.0.1:8080/docliteralfromjava/jaxrpc"/>
            </port>
         </service>
    </definitions>Thanks

  • External Web Services: parameter SY-CLIENT cannot be fixed

    Hi,
    I am configuring Web Service for Supplier Directory. At the standard call structure, I added parameter SY-CLIENT and fixed the value as 300. However, the setting fails to override the default value of client. How can I change the client?
    Best regards,
    ts

    Hi TS,
    Add parameter SAP-CLIENT with your client number and try.
    Best Regards,
    Anil

  • NULL ARRAY PROBLEM... in DOCUMENT/LITERAL type web service

    let method signature is like this,
    public int ABC(String[] a);
    i am sending an null array from client side, like
    ABC(null);
    but on web service layer i am getting an array with length 1
    and element of this array is null.
    for example, {null} where i should get simple null, not an array with null element.

    My guess is that it is because .NET defaults to generating a document style interface whereas JDeveloper defaults to generating an RPC style interface. The end result is that JDeveloper wraps the document interface in something that looks document like - thus your client. To see how to handle this right now, check out this sample - you have to parse the XML:
    http://otn.oracle.com/tech/webservices/htdocs/series/net/content.html
    In the preview of JDeveloper 9.0.3 which is due quite soon - next few weeks roughly (crossing my fingers) - JDeveloper will wrap .NET document based Web services in a much more elegant wrapper - giving you exactly what you are looking for - a method called Validate rather than a vector of Elements.
    What I don't understand in your sample, however, is that you have WSDL generated from JDeveloper versus WSDL generated from .NET. Did you also do an implementation of the validate method in Java too?
    Mike.

  • Return type Web Service

    Hello,
    I have a web service created in Java:
    @WebMethod
    public Vector<Data> getData();
    This is how I am connecting to the web service:
    public function connectWS():void{
         var cr:CallResponder = new CallResponder();
         cr.addEventListener(ResultEvent.RESULT, connectWSResult);
         cr.token = myWebService.getData();
    My vect variable above does not provide me with the correct Data object. vect is assigned null. How ever if I have:
    public function connectWSResult(event:ResultEvent);void{
         var arrCollect:ArrayCollection = event.result as ArrayCollection;
    arrCollection gives me correct value of Data object.
    I want the webService to return me a Vector. How can I go about that?
    -H

    If I understand you correctly (do not see a 'vect' variable anywhere), the web service is working perfectly.  The getData() function is non-blocking and does not "wait" for the response from the web service.  This is why you need to add an event listener, to listen for the "result" event.  When the reply comes in, the listener triggers the handler (connectWsResult) which you appear to have defined correctly.
    So I'm not sure what the problem is if you say the handler is returning the correct data.  Am I missing something?

  • Web Service parameter conversion problem

    Hi,
       I have written a web service to provision a synchronization scope on a remote SQL Server 2008 database. The database will eventually sync with an SQL CE 3.5 database.
    [WebMethod]
    public bool ProvisionSQLRemoteScope(string remoteSQLConnStr, string scopeName, Microsoft.Synchronization.Data.DbSyncScopeDescription scopeDescCE)
    In my desktop application I call the web method as below.
    PEWebServiceReference.PEWebService ws = new PEWebServiceReference.PEWebService();
    //Create a connection to the desktop site database (SQL CE 3.5)
    SqlCeConnection desktopConnection = new SqlCeConnection(desktopConnStr);
    //Get the description from the desktop sdf site database
    Microsoft.Synchronization.Data.DbSyncScopeDescription scopeDescCE = SqlCeSyncDescriptionBuilder.GetDescriptionForScope(scopeName, desktopConnection);
    bool ProvisionRequired = ws.ProvisionSQLRemoteScope(remoteSQLConnStr, scopeName, scopeDescCE);
    But I get the below error?
    Cannot convert from 'Microsoft.Synchronization.Data.DbSyncScopeDescription' to 'PEWebServiceReference.DbSyncScopeDescription'
    Any help appreciated.
    Thanks
    Paul. 
    Paul Wainwright

    Michael,
               I edited my 'References.cs' file in my client app changing:
    public bool ProvisionSQLRemoteScope(string remoteSQLConnStr, string scopeName, PESQL.PEWebServiceReference.DbSyncScopeDescription scopeDescCE)
    to
    public bool ProvisionSQLRemoteScope(string remoteSQLConnStr, string scopeName, Microsoft.Synchronization.Data.DbSyncScopeDescription scopeDescCE)
    and also changed:
    PEWebServiceReference.PEWebService ws = new PEWebServiceReference.PEWebService();
    PEWebServiceReference.PEWebServiceSoapClient ws = new PEWebServiceReference.PEWebServiceSoapClient();
    and everything seems to work.
    Thanks for the help.
    Paul.
    Paul Wainwright

Maybe you are looking for

  • OIM 11g DBAT connector - user update not working after target recon

    Hi, I have configured a resource (XSVR3) with the DBAT 9.1.0.5.0 connector to do provisioning and target recon to and from the same custom database table, following the example found on the connector guide. Now what happens is the following: - if I f

  • Music speeds up when playing music in itunes!

    hi everyone, i recently bought a creative xmod and when i play music through itunes now the music speeds up to an insane speed, does anyone know how to fix this? i couldn't find any help on the creative tech support but i sae that others had this pro

  • Question about random function

    Is there a way to get 6 random numbers that not the same? I need this because I'm making a lottery from numbers 1-20. I need to make sure I don't get duplicate numbers. Will I need to make a nested loop statement? Thx for whoever answers my questions

  • Legend box

    I have a bar chart in my report, but I dont want the legend box to appear besides my chart. How do I do this?

  • Keep grid scroll position across updates?

    I have a JBoss app server status monitor that uses the XML status page to update a Flex grid control. I can scroll down in the list, but when the grid auto-updates, it puts the scroll position back at the top of the grid. This is very inconvenient fo