Web service gen'd wrong?

Using JDev 10.1.3.0.4.3673...
The goal of this is to pass an array of objects from a java/oracle web service to a .NET client. I'm posting here because it seems there may be a JDev issue with how a web service is created.
OK, I create a stateless session bean. Also, create a bean defining a drivelayout object; generate it's getters/setters. The session bean has a method that'll take rows from a DB, put the data into a drivelayout object, add that object to an arraylist, then do it for the next row found. I then use toArray to take the data from the Arraylist holding the drivelayout objects then return the array as the method's result..
I then generate a web service for the session bean. No problems gen'ing the service.
If I gen the service as document/literal I'll get a serialization error when I test the service; using the servlet gen'd in OC4J. This "should" work, but...
If I gen the service as document/wrapped I get a correct output; an XML doc indicating an array of drivelayout elements, with the elements of drivelayout. Visual Studio 2003 can create a valid web reference to the web service and parse the data passed in correctly.
The problem is that, for interop, I've been under the impression that doc/literal is supposed to be the way to go.
One strange thing is the WSDL gen'd by JDev does show doc/literal
<binding name="DriveSchedRTNSoapHttp" type="tns:DriveSchedRTN">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="readlayouts">
<soap:operation soapAction="http://createsched//readlayouts"/>
<input>
<soap:body use="literal" parts="parameters"/>
</input>
Since the whole thing seems to work I guess I'm happy but I'm wondering if something will get "fixed" causing this to break in a future release.
Let me know if you need any supporting docs; code, WSDL, etc.
Thanks

Hi,
I don't think that JDev is generating the service incorrectly. Doc-wrapped is really just a special form of doc-lit, intended to make the input parameters of a procedure call look more like one big single input "document". There's no hard-and-fast way to spot a doc-wrapped service, other than to look at the input message for an operation. If it has one part named parameters, defined by an element rather than a complexType, then you've got a wrapped input.
So I think you should be OK with respect to interoperability. If you have any doubts, then you can use the JDev HTTP Analyzer and WS-I testing tools integration to verify that the WSDL document and SOAP messages sent and received match the WS-I interop standards.
Hope that helps,
Alan.

Similar Messages

  • Web serv gen'd wrong?

    Using JDev 10.1.3.0.4.3673...
    The goal of this is to pass an array of objects from a java/oracle web service to a .NET client. I'm posting here because it seems there may be a JDev issue with how a web service is created.
    OK, I create a stateless session bean. Also, create a bean defining a drivelayout object; generate it's getters/setters. The session bean has a method that'll take rows from a DB, put the data into a drivelayout object, add that object to an arraylist, then do it for the next row found. I then use toArray to take the data from the Arraylist holding the drivelayout objects then return the array as the method's result..
    I then generate a web service for the session bean. No problems gen'ing the service.
    If I gen the service as document/literal I'll get a serialization error when I test the service; using the servlet gen'd in OC4J. This "should" work, but...
    If I gen the service as document/wrapped I get a correct output; an XML doc indicating an array of drivelayout elements, with the elements of drivelayout. Visual Studio 2003 can create a valid web reference to the web service and parse the data passed in correctly.
    The problem is that, for interop, I've been under the impression that doc/literal is supposed to be the way to go.
    One strange thing is the WSDL gen'd by JDev does show doc/literal
    <binding name="DriveSchedRTNSoapHttp" type="tns:DriveSchedRTN">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="readlayouts">
    <soap:operation soapAction="http://createsched//readlayouts"/>
    <input>
    <soap:body use="literal" parts="parameters"/>
    </input>
    Since the whole thing seems to work I guess I'm happy but I'm wondering if something will get "fixed" causing this to break in a future release.
    Let me know if you need any supporting docs; code, WSDL, etc.
    Thanks

    Hi,
    I don't think that JDev is generating the service incorrectly. Doc-wrapped is really just a special form of doc-lit, intended to make the input parameters of a procedure call look more like one big single input "document". There's no hard-and-fast way to spot a doc-wrapped service, other than to look at the input message for an operation. If it has one part named parameters, defined by an element rather than a complexType, then you've got a wrapped input.
    So I think you should be OK with respect to interoperability. If you have any doubts, then you can use the JDev HTTP Analyzer and WS-I testing tools integration to verify that the WSDL document and SOAP messages sent and received match the WS-I interop standards.
    Hope that helps,
    Alan.

  • Web Service Host is wrong

    Hello everybody,
    at the Web Service Navigator of the NWDS, the Web Services point to the wrong host. They do point to http://erp04:50000/ but should point to http://erp04.xxx.de:50000 where the J2EE Engine is installed. Thus i cant use the NWDS to test the WS. I also cant publish them to the UDDI, as there it does point to the wrong host as well.
    So my question is, where is the host of the Web Services configured?
    regards,
    Markus

    Thank you for the reply,
    but why does the SLD has a wrong URL for the WAS Java at all? All i have done was to trigger the SLD Supplier at the Visual Admin tool in order to get the J2EE Engine listed at the SLD. Somehow somewhere there is a wrong entry, or where does it get the url from?
    regards,
    Markus

  • Letter spacing wrong when generting pdf in web service

    I have a turnkey JBoss Installation on a Windows Server 2008 R2 Standard.
    When I create a pdf document out of an doc (Office 2003 SP3) or docx (Word 2007 SP2)
    with the web services I get wrong letter spacing. If I simply create a pdf out of Microsoft Word with the
    installed Adobe Add-On on the same server the spacing is correct.
    There is no error or warning in all the log files.
    I tried already all kind of settings in the font settings, but no success.
    You can see the differences in the attachment.
    Any help would be appreciated.
    Answer: I tested a lot by myself and finally it worked. I am still not 100% sure why, but I think it is the following:
    When you have configured the turnkey installation, everything is up and running afterwards. But then you have these strange letter spacings.
    When you restart the jboss service (Windows) then it is correct afterwards.
    Message was edited by: Markus Ebel

    > Yeah, Motter Corpus is pretty distinctive. If you got a font substitution you'd know.
    But would you know if the font was not embedded (other than by looking at the file properties) when viewing on a system where it is installed?
    It looks to me as if the spacing issue is confined to the headings. Is that right? Have you previewed the page with custom tracking and kerning highlighted in ID (you'll find those settings in the preferences under Composition)? On screen shot the spacing looks very even so that's what I'd check first.
    What does the ID file look like for those same pages?
    Peter

  • External Web Service - User and password in HTTP header

    Hi!
    How is it possible to add user and password in the HTTP header in a external web service call? 
    I have created a "Portal Service from WSDL file - Client side" with the wizard in SAP Developer Studio.  I following the Java Development Guide - Web Service Security, and use the <i>secured service connection</i>.  I have also created a new <i>System Landscape</i>, but should the new system be based on HTTP, my own PAR or what?
    How can I check that the user and password is added to the HTTP header or the SOAP envelope? Do I have to scan http traffic with a proxy as Paros or can I find the request sent from SAP EP in the logs?
    Cheers
    Asle

    Hello All,
    I have been struggling a bit while putting a reasonable security framework on a jax-rpc style web service. I'm using JWSDP1.2 to set up the webservice. I've tried to outline my problem below. Please correct me where I'm wrong.
    I've been through the Sun's WS tutorials, but they are not really clear on security. However, from them I surmised that there are two decent authentication techniques. HTTP Basic and mutual authentication (MA) . Both have their drawbacks though. HTTP Basic suffers from poor encryption while MA is a bit difficult to set up on both client and server sides. Another problem with MA is that there is no central repository for users/passwords.
    OK, what I would really like to do is use my own user database to verify users/passwords i.e. use a HTTP Basic like authentication (but at application level) but run it over SSL for encryption. It seems simple, but is it possible?
    Also, I have noted that when I use HTTP Basic on the service side, and use a java client, then setting username/password has no effect. In other words, I can always access the web-service, even with wrong username/password.
    Sorry for the long post. Hope someone can help. Thanks.

  • Java client for calling a XI web service

    Hello,
    does anyone have created a Java client
    with Apache Axis? I tried it and it works
    for web service which aren't provided by
    SAP XI, but if I use to call a XI web service
    something went wrong.
    The XI web service works. I tested it with
    XML Spy.
    I think there must be something special with
    XI web service.
    So anyone got a tutorial/guide for this???
    thanks
    chris

    Hola mi  nombre es Luis,
    Creyendo que eres español te escribo en tal idioma.
    He visto que a ti también te devolvía un error de autentificación 401, y que lo subsanaste, pero a mi con la solución que te dieron no me vale, ya que implemento el código que te ofrecieron para arreglarlo y ahora me da un fallo de "Server Error" poniendo en usuario y password, los correspondientes a XI.
    +Request_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay req=new Request_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay();
    wdContext.nodeRequest_MI_outTurnoverDetailsDisplay_MI_outTurnoverDetailsDisplay().bind(req);
    req._setUser("username");
    req._setPassword("password");+
    No sé si es que ese usuario y contraseña son otros distintos.
    Si pudieras ayudarme, te lo agradecería.
    Un saludo, Luis

  • Web Service Client Generation on 7.10 SP3 - No WSDL URL is specified....

    We have a mysterious problem here.
    In out ABAP system we had a WebService created. With "New - Web Service Client" we created a web service client on the java side for that one and we were able to invoke it.
    We had to recreate this Web service due to wrong naming conventions. And now the problem starts.
    In the Main service class we had before something generated by NWDS:
    private static java.net.URL SERVICES_SERVICE_WSDL_LOCATION = null;
    static {
        java.net.URL url = null;
        try {
              java.net.URL tmpUrl = Thread.currentThread().getContextClassLoader().getResource("wsdl/com/sap/document/sap/soap/functions/mc_style/sap/bc/srt/wsdl/bndg_001279D063121DECA58AC5F7200DC55D/wsdl11/allinone/ws_policy/document/rootwsdl_SERVICES.wsdl");
              url = new java.net.URL(tmpUrl.getProtocol(), tmpUrl.getHost(), tmpUrl.getPort(), tmpUrl.getFile());
        } catch (java.net.MalformedURLException e) {
          e.printStackTrace();
        SERVICES_SERVICE_WSDL_LOCATION = url;
    After the new creation with the new Web Service this static initializer is gone an we see:
    private final static java.net.URL SERVICE_WSDL_LOCATION = null;
    This code is ridiculous, to make something static final and set it to Null. And as expected at runtime it results in WebServioceException telling us:
    No WSDL URL is specified for service [class com.sap.document.sap.soap.functions.mc_style.Service] on service creation.
    Anyone knows what is going wrong here??
    Best regards,
    Frank

    Same problem here.
    From Netweaver dev studio, I'm generating a deployable proxy for a Session Bean that is supposed to access a webservice but I keep getting the exception:
    "Caused by: javax.xml.ws.WebServiceException: No WSDL URL is specified for service [class eu.socrades.sap.ServiceMonitorBeanTESTService] on service creation.
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.<init>(SAPServiceDelegate.java:108)
    at com.sap.engine.services.webservices.espbase.client.jaxws.cts.CTSProvider.createDelegate(CTSProvider.java:170)
    at com.sap.engine.services.webservices.espbase.client.jaxws.cts.CTSProvider.createServiceDelegate(CTSProvider.java:151)
    at javax.xml.ws.Service.<init>(Service.java:57)
    at eu.socrades.sap.ServiceMonitorBeanTESTService.<init>(ServiceMonitorBeanTESTService.java:14)"
    I'm injecting the reference to the service with:
    @WebServiceRef(wsdlLocation = "rootwsdl_ServiceMonitorBeanTESTService.wsdl")
    private ServiceMonitorBeanTESTService service;
    I tried changing the location to a URL (where the wsdl can be downloaded from) or to "META-INF/wsdl/eu/socrades/sap/rootwsdl_ServiceMonitorBeanTESTService/rootwsdl_ServiceMonitorBeanTESTService.wsdl" but that did not help.
    Any clue?
    Thanks a lot,
    Dom

  • Error Calling Web Service - VersionMismatch Wrong SOAP Version

    Hello,
    I am attempting to create a web service from a function module, and to call this web service from outside of SAP.
    I used the Web Service Creation Wizard to create a web service from BAPI_CURRENCY_GETLIST, and tested it using the Web Service Homepage button from transaction WSADMIN. Everything seems to work OK so far.
    To test calling the web service, I copied the SOAP envelope from the web service homepage into a vbscript file:
    Const HOST = "http://<server>.<domain>:<port>"
    Const URL = "/sap/bc/srt/rfc/sap/ZWSD_Currency?sap-client=<nnn>"
    ' Create the HTTP object
    Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
    Dim Request
    Request = "<?xml version=""1.0"" encoding=""UTF-8"" ?>" & _
              "<SOAP-ENV:Envelope xmlns:SOAP-ENV=""http://schemas.xmlsoap.org/soap/envelope"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema"" xmlns:xs=""http://www.w3.org/2001/XMLSchema-instance"">" & _
              "<SOAP-ENV:Header>" & _
              "<sapsess:Session xmlns:sapsess=""http://www.sap.com/webas/630/soap/features/session/"">" & _
              "<enableSession>true</enableSession>" & _
              "</sapsess:Session>" & _
              "</SOAP-ENV:Header>" & _
              "<SOAP-ENV:Body>" & _
              "<ns1:CurrencyGetlist xmnls:ns1='urn:sap-com:document:sap:soap:functions:mc-style'>" & _
              "<CurrencyList><item>" & _
              "<CURRENCY></CURRENCY>" & _
              "<CURRENCY_ISO></CURRENCY_ISO>" & _
              "<ALT_CURR></ALT_CURR>" & _
              "<VALID_TO></VALID_TO>" & _
              "<LONG_TEXT></LONG_TEXT>" & _
              "</item></CurrencyList>" & _
              "</ns1:CurrencyGetlist>" & _
              "</SOAP-ENV:Body>" & _
              "</SOAP-ENV:Envelope>"
    xmlhttp.open "POST", HOST & URL, False
    xmlhttp.send (request)
    MsgBox (xmlhttp.responseXML.xml)
    When I execute the vbscript, the response is
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelop/">
    <soap-env:Body>
      <soap-env:Fault>
        <faultcode>
          soap-env:VersionMismatch
        </faultcode>
        <faultstring xml:lang="en">
          Wrong SOAP Version
        </faultstring>
      </soap-env:Fault>
    </soap-env:Body>
    </soap-env:Envelope>
    The system log (transaction SM21) contains the messages:
    SOAP Runtime: SOAP Fault exception occurred in program CL_SOAP_MESSAGE===============CP in include CL_SOAP_ME SSAGE===============CM00X at position 34
    SOAP Runtime: Exception message: Severe processing error; SOAP fault handling required
    In the RFC trace (transaction SM59) I see
    XRFC> INFO 14:25:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING     <
    XRFC> ROOT->IFSOAP_TRANSPORT_BINDING~RESPONSE() Try to create response  <
    XRFC> message                                                             <
    XRFC>                                                                     <
    XRFC> INFO 14:25:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING     <
    XRFC> ROOT->IFSOAP_TRANSPORT_BINDING~RESPONSE() Response message        <
    XRFC> created                                                             <
    XRFC>                                                                     <
    XRFC> INFO 14:25:10: SOAP Transport binding CL_SOAP_HTTP_TPBND_ROOT       <
    XRFC> ->IF_SOAP_TRANSPORT_BINDING~RECEIVE() Try to receive message        <
    XRFC>                                                                     <
    XRFC> 20071218 142510 00037640: SOAP Fault Exception caught: : Wrong      <
    XRFC> SOAP Version                                                        <
    XRFC>                                                                     <
    XRFC>                                                                     
    XRFC> End of user trace                                                   
    How can I tell what version(s) of SOAP the NetWeaver 2004 platform supports? Has anyone seen and resolved this error?
    Thanks in advance,
    Mark

    Hi Anton,
    Thanks for the helpful suggestion. I did try setting SOAPAction using xmlhttp.setRequestHeader, but that didn't seem to make any difference. I may not have formatted the SOAP header correctly, however.
    What I noticed is that if I added a slash at the end of the xmlns:soap tag in the SOAP envelope, I got a different error message (SOAP Processing failure, error id = 112).
    I downloaded version 2.0 of the .NET framework and the SOAPSonar tool. SOAPSonar was able to format the SOAP envelope from the WSDL. When I pasted the SOAP envelope from SOAPSonar into my vbscript file, it worked. So, the vbscript looks like this:
    Const HOST = "http://nwr051.nwenergy:1080"
    Const URL = "/sap/bc/srt/rfc/sap/ZWSD_Currency?sap-client=100"
    Const FORMAT = "dd-MMM-yy"
    ' Create the HTTP object
    Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
    Dim Request
    Request = "<?xml version=""1.0"" encoding=""utf-8""?>" & _
              "<soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:tns=""urn:sap-com:document:sap:soap:functions:mc-style"">" & _
              " <soap:Body>" & _
              "    <tns:CurrencyGetlist>" & _
              "      <CurrencyList>" & _
              "      </CurrencyList>" & _
              "    </tns:CurrencyGetlist>" & _
              "  </soap:Body>" & _
              "</soap:Envelope>"
    xmlhttp.open "POST", HOST & URL, False
    xmlhttp.send (request)
    MsgBox (xmlhttp.responseXML.xml)
    Again, thanks for taking the time to read through this and offer your insight.
    Regards,
    Mark

  • Web service calling in HTTPS, certificate, hostname wrong

    Hi
    Im triying to call a web service running in WSO2 Carbon and I cant do it because I was geting a exception asking for a certificate.I had success importing a valid certificate, but now I get the following exception
    HTTPS hostname wrong: should be <10.36.15.100>
    this ip is the one where the WSO2 Carbon is running with the web service Im calling.
    When I consume services running in other places I gat no problem and I can consume the service running in the WsO2 with the SOAP UI, so I dont Know what happend?
    Thanks
    Ray

    Glad to help.
    I actually had a similar problem a few weeks ago. I created a remote enabled FM in our R/3 system that was called by a program in our SRM system. When I ran the FM in R/3 it worked, but from SRM, no joy.
    Eventually, I found that I had mispelled a parameter in the calling program. Since, the FM didn't exist in SRM, the calling program couldn't report any syntax error or give a dump. I corrected the spelling and it finally worked.
    Rob

  • Problem configure WSDL destination for web services metadata gen and exec

    Hello,
    First question:
    Is WSIL supported by an R/3 4.7 ABAP system?
    If yes I'd like to consume web services from it (Function Modules remote-enabled), through WSIL. I need thus to configure 2 WSDL destinations on the SLD for metadata generation and execution.
    Second question:
    What are the url to fill-in into the destination template configurations?
    Thanks for your input,
    Tanguy Mezzano

    In other words, is it possible to call web services from a R/3 4.7 abap stack with WSIL, thus not through the WSDL. For that we need to set two WSDL destinations in the SLD in section SOAMANAGER.
    Or is this only possible for ECC6.0?
    Thanks for helping.
    Tanguy

  • Wrong data when consuming web service via ABAP

    Dear all,
    we tried to consume a web service via ABAP and used one of the various existing how-to papers from the internet in order to develop everything.
    The development was not that difficult, but when we now execute our ABAP, we noticed that
    - the first 100 returned rows from the webservice are completely correct
    - then we receive 10-15 completely incorrect rows (empty fields, redundant lines, etc.)
    - the rest of the data (60 records) is correct again
    As we nearly all objects have been generated automatically via SE80, I do not really know where this problem might come from. We double checked the original data and there everything is correct.
    Any ideas?
    Thanks for your feedback,
    Andreas

    Marcelo  Almeida wrote:
    > You can use Logial port for it in LPCONFIG ( Transaction). See this examplo Below:
    >
    > TRY.
    >
    > CREATE OBJECT my_proxy
    > EXPORTING
    > logical_port_name = 'LP01'.
    > CATCH cx_ai_system_fault.
    > ENDTRY.
    >
    > TRY.
    > input-airline_id = p_carrid.
    > input-connection_id = p_connid.
    > input-flight_date = p_fldate.
    >
    > CALL METHOD my_proxy->flight_get_detail
    > EXPORTING
    > input = input
    > IMPORTING
    > output = output.
    > CATCH cx_ai_system_fault.
    > CATCH cx_ai_application_fault.
    > ENTRY.
    >
    > Its necessary create a connection in SM59 (type H) and setting in the call parameters logical port (LPCONFIG).
    Hi,
    thanks for your answer. It´s working!
    Cheers,
    Andy

  • Sun BPEL engine sets wrong Content-Type on calling an external web service

    I have a WSDL for an external web service (which as it happens is running in Websphere locally) and have implemented it as a
    partnerlink on a BPEL diagram in an SOA composite project. The binding style is Document and if you use SOAPUI to test it it
    works fine. Tracing on the web service's server shows the SOAP request coming in. It has a content-type of text/xml, as expected. If I do a JUnit test from NetBeans based on this WSDL alone it also works - same result. BUT if I do
    a full test and call my BPEL process the invocation of this service from BPEL fails.
    On the Test result you see
    BPCOR-6135:A fault was not handled in the process scope; Fault Name is http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault;
    (This happens because I did not handle the fault in the BPEL.)
    On the trace I see it now has Content-type of application/xop+xml. Why would the Sun BPEL engine change this? I just
    accepted the usual defaults when I created the PartnerLink and the Invoke. Anyway, the format of the request doesn't match what the WS server expects, so it fails.
    As far as I'm aware I'm just using SOAP1.1. This is NetBeans 6.5 with Glassfish 2.1. I tried with NetBeans 6.7 and it got worse, not better. I would certainly appreciate any advice?
    Thanks

    Perhaps when the BPEL file based process calls the WSDL file to execute,their message communication is not correct.
    the head part in the WSDL file should be manually set to "text/xml", or the IDE or Server will use the default value;
    for example as follow:
    SOAPUI tool would use the default value "text/xml" to request.(depends the tool support).
    NetBeans tool would use the default value "text/xml" to request.
    when you do a full test and you do not set the head "context-type" value ,the WSDL file use the server's default head
    value"application/xop-xml" so that return the contents under the control of the server's default value.
    I hope these will be useful for you.

  • BPEL engine sets wrong Content-Type on calling an external web service

    I have a WSDL for an external web service (which as it happens is running in Websphere locally) and have implemented it as a
    partnerlink on a BPEL diagram in an SOA composite project.
    The binding style is Document and if you use SOAPUI to test it it
    works fine. Tracing on the web service's server shows the SOAP request
    coming in. It has a content-type of text/xml, as expected. If I do a
    JUnit test from NetBeans based on this WSDL alone it also works - same result. BUT if I do
    a full test and call my BPEL process the invocation of this service
    from BPEL fails.
    On the Test result you see
    BPCOR-6135:A fault was not handled in the process scope; Fault Name is http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault;
    (This happens because I did not handle the fault in the BPEL.)
    On the trace I see it now has Content-type of
    application/xop+xml. Why would the Sun BPEL engine change this? I just
    accepted the usual defaults when I created the PartnerLink and the
    Invoke. Anyway, the format of the request doesn't match what the WS server expects, so it fails.
    As far as I'm aware I'm just using SOAP1.1. This is NetBeans 6.5 with
    Glassfish 2.1. I tried with NetBeans 6.7 and it got worse, not better.
    I would certainly appreciate any advice?
    Thanks

    Perhaps when the BPEL file based process calls the WSDL file to execute,their message communication is not correct.
    the head part in the WSDL file should be manually set to "text/xml", or the IDE or Server will use the default value;
    for example as follow:
    SOAPUI tool would use the default value "text/xml" to request.(depends the tool support).
    NetBeans tool would use the default value "text/xml" to request.
    when you do a full test and you do not set the head "context-type" value ,the WSDL file use the server's default head
    value"application/xop-xml" so that return the contents under the control of the server's default value.
    I hope these will be useful for you.

  • OS X Server fills out wrong PayloadType for Exchange Web Services

    Hi,
    I've noticed a problem with OS X Server, v 3.0.2, when you configure it to setup a user with a Mac OS X Exchange Web Services (EWS) account.
    There is a drop down to choose between iOS (for Exchange Active Sync) or OS X (for Exchange Web Services).
    If you select EWS and fill out the fields, the generated .mobileconfig file has
    PayloadType com.apple.eas.account
    followed by your EWS settings.
    When you install it on the Mac it also reports it as an iOS setting and does not add the account.
    If you manually edit the mobileconfig file, changing PayloadType to
    com.apple.ews.account
    before trying to load it onto the mac, it accepts the EWS account and you can then see it listed in System Preferences->Internet accounts.
    Cheers,
    faz_uk.

    Hi,
    I've noticed a problem with OS X Server, v 3.0.2, when you configure it to setup a user with a Mac OS X Exchange Web Services (EWS) account.
    There is a drop down to choose between iOS (for Exchange Active Sync) or OS X (for Exchange Web Services).
    If you select EWS and fill out the fields, the generated .mobileconfig file has
    PayloadType com.apple.eas.account
    followed by your EWS settings.
    When you install it on the Mac it also reports it as an iOS setting and does not add the account.
    If you manually edit the mobileconfig file, changing PayloadType to
    com.apple.ews.account
    before trying to load it onto the mac, it accepts the EWS account and you can then see it listed in System Preferences->Internet accounts.
    Cheers,
    faz_uk.

  • How do I create a "document-centric" Web Service?

    By document-centric I'm talking about receiving a SOAP message on the server-side, where the initial parsing and security processing (this aspect is very important) is performed but then allowing the developer to access the delivered "payload", i.e. the XML, and perform whatever mapping/processing that is required without automatically mapping to the "standard" auto-generated Java objects.
    It is important that the client receives the "full" complex WSDL and can therefore generate their proxy classes with whatever tool (or language) that is appropriate.
    On the server side we do not want to create hundreds (if not thousands) of Java Bean clases as we already have the legacy code to map XML to Java. The idea is that JAX-RPC only instantiates the SOAPElements that represent the "raw" message, or, if possible, doesn't instantiate any objects whatsoever.
    I've spent many days now trying to find a single well-worked example for this type of Web Service without success - many, many references of the style "..and you can then create a document style web service.." but without the all important "how".
    From what I've read a custom type-mapping and/or serializer/deserializer could be the answer but again no good, solid examples are forthcoming.
    Another alternative seems to be to create the server side stub-classes using a "dummy" WSDL with the elements set to "anyType" but then distribute the "genuine" WSDL to the clients - we've got a simple example of the kind working but I don't like the idea of "tricking" the system in this way.
    I'm working with WASD 5.1, which in theory conforms with JAX-RPC so any ideas offered here should also apply in that environment.
    Has ANYONE successfully created a service of this type?
    Any help with this issue would be very much appreciated and rewarded (with Duke Dollars of course).
    Chris.

    Chris,
    I too noticed that most vendors take the RPC centric approach. Its because most of the industry examples of how WSs were used were simple enough to implement using RPC and anything more (document literal) would add to the complexity of implementation. This is something that is feared by many developers, especialy the .Net crowd who seem to want everything done through a wizard menu interface and don't care about other WS implementations at all.
    This is sort of changing. J2EE 1.4 is WS-I compliant, so when you compile server side ties from WSDL you can specify a document literal option and WS-I compliance. This gives you access to the SOAPElement objects. There's still issues with going between W3C DOM and SOAP elements but that's just API inconvenience, not a show stopper. As the inudustry develops more complex WSs we will see the vendors change their tools to better support this...
    Anyway, some more help...
    I use the the following wscompile options to build from WSDL for document literal WSs.
    wscompile.bat -d . -nd . -s . -f:documentliteral -f:wsi -keep -model model.gz -import config.xml
    wscompile.bat -d . -nd . -s . -f:documentliteral -f:wsi -keep -model model.gz -gen:server config.xml
    My "wrapper" elements look like this...
    <xs:element name="AComplexXMLResponse">
         <xs:complexType>
              <xs:sequence>
                   <xs:element ref="myNS:MYComplexXMLType"/>
              </xs:sequence>
         </xs:complexType>
    </xs:element>
    If I do this:
    <xs:element name="ASimpleXMLResponse">
         <xs:complexType>
              <xs:sequence>
                   <xs:element name="AName" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
    </xs:element>
    I still get the JAXRPC language bindings to a string, but in my case I don't really care. This may well be different for you.
    What I do to manage these elements is to split up the WSDL, WS wrapper element definitions and actual data XML schema definitions into separate documents. This means I have a WSDL which IMPORTS my message schema (this is where I define wrappers for in and out XML) which INCLUDES the actual DATA XML schema that I have.
    The WSDL import looks like this:
    <types>
         <xs:schema>
              <xs:import namespace="http://schemaURI" schemaLocation="./relativePath/WrapperElementSchema.xsd"/>
         </xs:schema>
    </types>
    The wrapper element schema has:
    <xs:include schemaLocation="./ActualDataSchema.xsd"/>
    This way I can easily replace the wrapper documents with just anyType references if something doesn want to play nice. The data schema file and the WSDL stay the same. This minimises the impact on what you have to change in your distribution. This is important as the WSDL is often generated on the fly by your WS environment and so can not be easily changed once you build your WSs, but the schema files it references are easily changed without affecting your code.
    Another reason for the wrapper elements was a JWSDP 1.2 issue (I don't know if this has been fixed in 1.3), where if you had the same method parameter signature in a web service (the parameters it took were the same XML types, for instance if you have an add and update methods for the same document input) JWSDP would get confused at runtime. It did not take account of the SOAP action that came along with the request to determine which operation to call. It just took the incoming XML, saw that it was of a certain type and it passed it to the first operation that took this element, which is VERY wrong. By using the wrapper elements, I could give all my input and output elements for each method different names (I used a naming stragegy that appended a 'request' or 'response' string to the method name to form a method parameter element name. This is a pain in the ass, but works and does wonders for interoperability with other WS vendors. Like I said before, I've got this working with JWSDP, BEA and .Net servers and clients.
    Hope this helps,
    If you think there is a real need for a public HOWTO on this, I could write one with a full step by step guideline that shows where I broke my legs getting this stuff to work. But this would eat into my sleep time :-/ TO JUDGE INTEREST I call on all people interested in a tutorial to respond to this thread (esp people involved with the JWSDP WS tutorial documentation). If I get 5 or more different people responding I will loose some sleep for the good of this community. Otherwise, I will just try to help you when I have time to read the forums.
    Kuba

Maybe you are looking for