6 Replies Latest reply: Jan 15, 2014 4:09 PM by cba828a6-8b07-4002-b2f1-26c962c001ac RSS

    Unifier WSDL for ASP.NET?

    oweowe

      After the URL changed to https://primavera-unifierint.oracleindustry.com for Web Services Integration on 12/22/2013, our Web Services integration program (using ASP.NET C#) couldn't work anymore.

       

      This is the error I got when using Visual Studio 2010 to debug:

      Unable to import WebService/Schema. Unable to import binding 'mainserviceSoapBinding' from namespace 'http://primavera-unifierint.oracleindustry.com/ws/services/mainservice'. Unable to import operation 'createObject'. The datatype 'http://xml.apache.org/xml-soap:DataHandler' is missing.

       

      It appears the WSDL provided in the link: https://primavera-unifierint.oracleindustry.com/ws/services/mainservice?wsdl cannot be resolved by ASP.NET.

       

      We used to encountered similar issues before. It was resolved after Skire Technical Support provided a WSDL file compatible with ASP.NET. I am wondering if this is the same situation. Any thought on this?


        • 1. Re: Unifier WSDL for ASP.NET?
          Marc DiNick

          If technical support previously solved a similar issue, I’d consider opening an SR with Oracle, particularly since this is related to the migration.

          • 2. Re: Unifier WSDL for ASP.NET?
            oweowe

            I think this is a generic issue for all customers using ASP.NET for Web Services integration with Oracle host. This is why I posted here.

            2 weeks passed already. There is no solution from Oracle to our service request yet....

            • 3. Re: Unifier WSDL for ASP.NET?
              1063579

              did you get it fixed?  we got new wsdl from oracle support and that fixed our issue.

              • 4. Re: Unifier WSDL for ASP.NET?
                cba828a6-8b07-4002-b2f1-26c962c001ac

                We also have the same issue with the WSDL...

                • 5. Re: Unifier WSDL for ASP.NET?
                  user10066206

                  Sorry this didn't copy and past very well, but should help you... enjoy

                  -Luther

                   

                   

                  The Unifier WSDL doesn’t appear to conform to WS-I standards.However with a slight change I’ve made it work with .NET. The server move has caused some slight changes in the WSDL and you can’t use the old WSDL with the new service, at least it didn’t work for me, but following these instructions will allow you generate a Web or Service reference in either case. This works with the new server for us, so hopefully it will for you too – our new URL is different than yours but I put yours in below for the example.

                   

                  The only errors generated by the .NET WSDL tool are because of two references in the WSDL to “apachesoap:DataHandler” which is not defined in the WSDL and is proprietary. Fortunately, we don’t seem to need these, at least not for getUDRData which is what we have been using so far.

                   

                  You can download and manually edit the WSDL to make it work with .NET by replacing the two references to “apachesoap:DataHandler” to “xsd:anyType”.

                   

                  Here some step-by-step instructions I wrote up after having to do this a couple times.

                   

                  1. Create a new temp folder to store the WSDL
                  2. Open a “Developer Command Prompt for VS2012”
                    (e.g. Start -> All Programs -> Visual Studio 2012 -> Visual Studio
                    Tools)
                  3. Change to the new folder, e.g. “cd C:\test” from
                    the command prompt
                  4. Run the following command and observe similar
                    output:

                   

                  C:\test>disco https://primavera-unifierint.oracleindustry.com/ws/services/mainservice?wsdl

                   

                  Microsoft (R) Web Services Discovery Utility

                  [Microsoft (R) .NET Framework, Version 4.0.30319.17929]

                   

                  Copyright (C) Microsoft Corporation. All rights reserved.

                   

                  Disco found documents at the following URLs:

                   

                  https://primavera-unifierint.oracleindustry.com/ws/services/mainservice?wsdl

                   

                  The following files hold the content found at the corresponding URLs:


                  .\mainservice.wsdl <- https://primavera-unifierint.oracleindustry.com/ws/services/mainservice?wsdl

                   

                   

                  The file .\results.discomap holds links to each of these files.

                   

                  C:\test>

                   

                  1. Note that two new files will be created, as
                    follows:

                   

                  C:\test>dir

                    Volume in drive C is OS

                    Volume Serial Number is 98C3-7CC5

                   

                  Directory of C:\test

                   

                  01/15/2014  11:11 AM            86,072 mainservice.wsdl

                    01/15/2014  11:11 AM               431 results.discomap

                                   2 File(s)         86,503 bytes

                   

                  C:\test>

                   

                  1. Open the newly created file mainservice.wsdl in your favorite text editor.
                  2. Search for replace "apachesoap:DataHandler" with "xsd:anyType" Two occurrences should be replaced.
                  3. Save and close.
                  4. You now have the option of manually running the
                    wsdl tool to create the C# code and then adding that to your project, or
                    letting Visual Studio take over from here. I recommend the latter so that you
                    get entries in your app.config, but the following are instructions for both
                    options.
                  5. To have Visual Studio complete the process for
                    you adding a Service Reference, follow these steps:
                    1. Open your Visual Studio project. (I used Visual
                      Studio 2012 for this)
                    2. Right click References and select Add Service
                      Reference
                    3. In Address, put in the local file path to the
                      WSDL, e.g. “C:\test\mainservice.wsdl” and then hit Go
                    4. You should see a Service on the left now called “MainService2Service”
                    5. Adjust the Namespace if desired
                    6. Click OK to complete the process
                    7. Observe that you now have a binding and endpoint
                      for mainservice in your app.config.
                    8. For some reason the HTTPS in the URL gets
                      changed to HTTP in the app.config – fix that and change it back to HTTPS.
                    9. Furthermore, to support HTTPS as a binding (vs.
                      HTTP), edit the basicHttpBinding in the app.config so that it looks like this:

                   

                            
                  <basicHttpBinding>
                   

                              
                  <binding name="mainserviceSoapBinding">

                   

                                  <security mode="Transport">

                   

                                    <transport clientCredentialType="None" />

                   

                                  </security> 

                              
                  </binding>

                            
                  </basicHttpBinding>

                   

                              …

                   

                   

                  1. Alternatively, to have Visual Studio complete
                    the process for you with old-school .NET 2.0 Web Service style references,
                    follow these steps:
                    1. Open your Visual Studio project. (I used Visual
                      Studio 2012 for this)
                    2. Right click References and select Add Service
                      Reference
                    3. Click on Advanced
                    4. In URL, put in the local file path to the WSDL,
                      e.g. “C:\test\mainservice.wsdl” and then hit arrow button
                    5. You should see MainService2Service Description
                      show on the left now called “MainService2Service”
                    6. Adjust the Web reference name if desired
                    7. Click Add Reference to complete the process
                    8. Observe that you now have a binding and endpoint
                      for mainservice in your app.config.
                  2. You can optionally generate the C# code manually
                    by running the following command to generate the web services code:

                   

                   

                  C:\test>wsdl results.discomap

                   

                  Microsoft (R) Web Services Description Language Utility 

                  [Microsoft (R) .NET Framework, Version 4.0.30319.17929] 

                  Copyright (C) Microsoft Corporation. All rights reserved.

                   

                  Warning: This web reference does not conform to WS-I Basic Profile v1.1.

                   

                  R2706: A wsdl:binding in a DESCRIPTION MUST use the value of "literal" for the use attribute in all soapbind:body, soapbind:fault, soapbind:header and soapbind:headerfault
                  elements.

                    -  Input element soapbind:body of operation 'createObject' on portType 'mainserviceSoapBinding' from namespace 'http://primavera-unifierint.oracleindustry.com/ws/services/mainservice'.

                    -  Output element soapbind:body of operation 'createObject' on portType 'mainserviceSoapBinding' from namespace 'http://primavera-unifierint.oracleindustry.com/ws/services/mainservice'.

                   

                   

                  For more details on the WS-I Basic Profile v1.1, see the specification at http://www.ws-i.org/Profiles/BasicProfile-1.1.html.

                   

                  Writing file 'C:\test\MainService2Service.cs'.

                   

                  C:\test>

                   

                   

                  • 6. Re: Unifier WSDL for ASP.NET?
                    cba828a6-8b07-4002-b2f1-26c962c001ac

                    Thanks Luther, that should work great.