IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

HTTP Error 415

  • 1.  HTTP Error 415

    Posted 05/02/06 06:31 PM

    Hi,

    We are using SOAP Integration. On my system when I run pub.client:soapHTTP which doesn’t contain two inputs i.e., ContentType and loadAs. Whereas the other server which contains all the patches has these additional inputs ContentType and loadAs. Also the service pub.soap.utils:createSoapData has the enCoding field in on server and the other doesn’t have. Whichever server doesn’t have additional input is working fine. Whenever I run the webService I am getting the error:

    header/status: 415
    header/statusMessage: Unsupported Media Type

    Can anyone please help on the same.

    With Regards,
    Navanee


    #soa
    #API-Management
    #webMethods


  • 2.  RE: HTTP Error 415

    Posted 05/02/06 07:12 PM

    The default content type is / was “text/xml”. I’m not sure what content type is provided by default for the newer service versions, but I would still expect that to be “text/xml”.

    One thing to check, if you already had a variable in your pipeline called “contentType” but used for something else and didn’t drop it before calling the new version of pub.client:soapHTTP, you might be sending an unintended content-type.

    Use a soap message capture tool to examine the message you are sending including the HTTP header properties. Also, talk with the publisher of the web service to see if they are expecting a specific content-type.

    Does setting contentType to “text/xml” on the new service versions work or fail?

    HTH,

    Mark


    #API-Management
    #webMethods
    #soa


  • 3.  RE: HTTP Error 415

    Posted 05/03/06 01:52 PM

    Hi Mark,

    Thanks for your response.

    I have installed the wsdl for communicating with Navision System. When I checked it’s showing that it’s passing as "text/xml’ charset=“UTF-8"”. Nowhere it’s overwritten.

    When I try workign this wsdl with the system where the patches are not applied, it’s working fine. When I put the wsdl where all the patches are applied, it’s throwing an error.

    Can you please let me know on the same.

    With Regards,
    Navanee


    #API-Management
    #soa
    #webMethods


  • 4.  RE: HTTP Error 415

    Posted 05/03/06 03:30 PM

    Find out from your vendor what content-type they are expecting and set the contentType variable to that value.


    #API-Management
    #webMethods
    #soa


  • 5.  RE: HTTP Error 415

    Posted 05/03/06 03:34 PM

    Hi Marc,

    When it’s working the system where no patches are applied, why is it not working with the system with all updated patches. One webMethods server with no patch is able to communicate and get the response properly. But the Development server which has all the patches is saying this error. Will there be anything with the patches?

    With Regards,
    Navanee


    #API-Management
    #webMethods
    #soa


  • 6.  RE: HTTP Error 415

    Posted 05/03/06 05:17 PM

    The patches added two parameters to the pub.client:soapHTTP built-in service one of which is content-type. Your error is related to contentType. Without knowing what content-type your vendor is expecting and is actually receiving, I can’t begin to tell you why the old version works and the new one does not, but my guess is that if you capture one of the soap requests you are sending that works and capture one you are sending that fails and compare them you will see a different contentType being sent.

    I’m not going to guess any futher on this issue. Capture the actual messages you are sending and compare the content types. If you can’t or won’t do this find someone who can or will.

    Mark


    #webMethods
    #API-Management
    #soa


  • 7.  RE: HTTP Error 415

    Posted 05/04/06 02:57 PM

    Hi mark,

    Below is the Header & Body that are created with the older version which gives the response from the end system as expected

    Header:

    Mozilla/4.0 [en] (WinNT; I)
    image/gif, /
    amshqc-navdev01
    Basic Og==
    text/xml
    http://verstel.com/WebServices/Navision/InvoiceOnHold
    933
    </HTTPHeaders

    Body
    [FONT=Arial][SIZE=2][FONT=Arial]<?xml version="1.0" encoding="UTF-8" ?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsd=“http://www.w3.org/1999/XMLSchema” xmlns:xsi=“http://www.w3.org/1999/XMLSchema-instance” SOAP-ENV:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>
    SOAP-ENV:Body
    <tns1:InvoiceOnHold xmlns:tns1=“http://verstel.com/WebServices/Navision”>
    tns1:customer_number10054</tns1:customer_number>
    tns1:document_numberGJ05000021</tns1:document_number>
    tns1:document_type2</tns1:document_type>
    tns1:promised_to_pay_date2006-11-17</tns1:promised_to_pay_date>
    tns1:requesting_userErik</tns1:requesting_user>
    tns1:company_nameTest</tns1:company_name>
    <tns1:case_number />
    tns1:descriptionlocal</tns1:description>
    <tns1: onhold>true</tns1: onhold>
    </tns1:InvoiceOnHold>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Below is the Header & Body that are created with the newer version which gives the response as 415 Unsupported Media type

    Header

    [FONT=Verdana][SIZE=2][FONT=Arial]
    Mozilla/4.0 [en] (WinNT; I)
    image/gif, /
    amshqc-navdev01
    Basic Og==
    text/xml’ charset=“UTF-8”
    http://verstel.com/WebServices/Navision/InvoiceOnHold
    867

    Body

    [FONT=Arial][SIZE=2][FONT=Arial]<?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsd=“XML Schema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
    - SOAP-ENV:Body
    - <tns1:InvoiceOnHold xmlns:tns1=“http://verstel.com/WebServices/Navision”>
    tns1:customer_number10054</tns1:customer_number>
    tns1:document_numberGJ05000021</tns1:document_number>
    tns1:document_type2</tns1:document_type>
    tns1:promised_to_pay_date2006-11-17</tns1:promised_to_pay_date>
    tns1:requesting_userErik</tns1:requesting_user>
    tns1:company_nameTest</tns1:company_name>
    <tns1:case_number />
    tns1:descriptionserver</tns1:description>
    tns1:onholdtrue</tns1:onhold>
    </tns1:InvoiceOnHold>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    If we compare both header xml’s, it’s clear that it’s the problem of the content type. But we don’t understand how to change the value of the content type in the version as it overwrites any content that we pass with text/xml’ charset=“UTF-8”.

    Please let me know what may be the reason for the same.

    With Regards,
    Navanee
    [/FONT][/SIZE][/FONT][/FONT][/SIZE][/FONT][/FONT][/SIZE][/FONT]


    #API-Management
    #webMethods
    #soa


  • 8.  RE: HTTP Error 415

    Posted 05/04/06 03:12 PM

    Now we are getting somewhere…

    If you set the content-type to “text/xml” without the quotes , what happens?

    If this still produces the same behavior, I would log a new Service Request with webMethods Support. You might also check the Advantage “known fixes” area for your IS release to see if there have been related fixes.

    Mark


    #webMethods
    #API-Management
    #soa


  • 9.  RE: HTTP Error 415

    Posted 05/04/06 03:44 PM

    Hi Marc,

    Thanks for your reply.

    Even if I set the content type using the Pick box list, it’s showing the content type as "text/xml’ charset=“UTF-8” ". If we watch closely, you can see a single codes “'” after text/xml. Hopefully, it’s the error on webMethods fix. Not sure about it.

    Is my understanding right?

    With Regards,
    Navanee


    #webMethods
    #API-Management
    #soa


  • 10.  RE: HTTP Error 415

    Posted 05/04/06 10:07 PM

    I just tested this using IS 6.5 with a variety of fixes applied and did not have the “content-type” issue.

    Here’s my sample SOAP request including the HTTP properties. I picked the “text/xml” value from the drop down list.

    POST /soap/default HTTP/1.0
    User-Agent: Mozilla/4.0 [en] (WinNT; I)
    Accept: image/gif, */*
    Host: 127.0.0.1:4003
    Authorization: Basic QU=
    Content-type: text/xml
    SOAPAction: ""
    Content-Length: 456
    

    [highlight=xml]

    <?xml version="1.0" encoding="UTF-8"?>

    <SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsd=“XML Schema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
    SOAP-ENV:Body
    <demo:myDoc xmlns:demo=“urn:mynamespace”>
    2006-05-03T14:27:12.123-06:00
    100.00
    </demo:myDoc></SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    [/highlight]


    #soa
    #webMethods
    #API-Management


  • 11.  RE: HTTP Error 415

    Posted 05/05/06 10:03 AM

    Hi Mark,

    The environment on which I am working is 6.1.

    With Regards,
    Navanee


    #API-Management
    #webMethods
    #soa


  • 12.  RE: HTTP Error 415

    Posted 05/05/06 03:04 PM

    Contact support for a fix that will address this issue.


    #webMethods
    #soa
    #API-Management


  • 13.  RE: HTTP Error 415

    Posted 05/09/06 11:16 AM

    Thanks a lot Mark. We are in touch with webMethods support to get the fix

    With Regards,
    Navanee


    #soa
    #webMethods
    #API-Management


  • 14.  RE: HTTP Error 415

    Posted 04/01/11 05:24 PM

    Do you know the solution for this thread? we are facing the same issue in our environment while calling the client service over webService.

    Thanks,
    Anks


    #soa
    #webMethods
    #API-Management