OSB: Checking content type of a Business Service response

Hi,
I have a Proxy Service <-> Business Service configured as a pass-through only. (including http headers)
The situation is: Sometimes, the service which my BS access send a fault response as a HTML instead of a fault soap envelop or something related with the provided xsd.
My PS receives this and send back to the caller, but my customer needs a fault message. The service provider will not modify this behavior, so i need a way to check the content of the response to see if it's is an html and raise an exception.
It's possible to do this ?

Wow.
First of all, ty for your really fast reply.
Seconde: A valid fault response message is something like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="my.foo.namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/" >
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Unknown processing error.</faultstring>
<detail>
<ImsException version="6.0" >
<exception>
<name>exception.NotAuthorizedException</name>
<code>700</code>
<description>
<![CDATA[Foo is not authorized to perform task.]]></description>
</exception>
</ImsException>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
I need to validate the <detail> tag agains my xsd. To do this, how to build the xquery to select this tag ? I need to apply some function on the content to transform the detail string into a structured xml ? It's something like:
soapenv:Envelope/soapenv:Body/soapenv:Fault/detail
If you have some links with examples i will appreciate.
Ty for your help.
Edited by: GSanches on 10/06/2010 06:27

Similar Messages

  • WCF returning "The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8)"

    I have a WCF service I am trying to run on a new installation of 64-bit Windows Server 2008 IIS. Although it runs fine on Windows 2003 IIS, it is throwing the error in the thread title, which appears to be a server config issue, but I am not sure. Googling and searching the MSDN forums did not turn up a solution. I tried running WCF Logging, but that didn't help either.
    Does anyone have any suggestions on how to solve this probelm?
    Here is the error:
    The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <title>500 - Internal server error.</title>
    <style type="text/css">

    I have the same issue on Windows 7 machine. The service works fine using a SoapUI client but a .Net client faisl to get a response.
    Hi,
    I have a WCF service which works perfectly when using SoapUI but throws error in my .Net client.
    {"The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first
    1024 bytes of the response were: '<HTML><HEAD><link rel=\"alternate\" type=\"text/xml\" href=\"http://xyz.mysite.com/ysa/Broker.svc?disco\"/><STYLE type=\"text/css\">#content{ FONT-SIZE: 0.7em;
    PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT:
    5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP:
    0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE><TITLE>Broker
    Service</TITLE></HEAD><BODY><DIV id=\"content\"><P class=\"head'."}
    I have the same service hosted on my local machine and when I point to the local service I can execute the operation with no issues. The message encoding is Soap11. I tried changing to Soap12 but I get exact same error. Any ideas greatly appreciated.
    I do have windows Activation Features installed and I am using .Net Framework 4.
    Thanks
    Sofia Khatoon

  • Business Service Response URI

    Hello,
    I have 2 clusters of managed servers (cluster 1 and cluster 2). I have another server with OSB. I created a business service that host several queues. I successfully created a proxy that routes messages from cluster 1 to the business service queues.
    My question is how do I route messages to Cluster 2? Do I enter the machine:port/factory/queue of cluster 2 in the business service response URI (if so it's not working:( ) or is another proxy needed to get messages there?
    Thanks for any help

    If you want to send messages to cluster 2 instead of your server, then change your endpoint uri to something like:
    jms://<host:port[,host:port]*/factoryJndiName/destJndiName
    If you want to read messages from your server queue and route them to cluster 2, than you have to create another proxy service that will consumer messages and route them to business service using flow.
    http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/interopjms/transport.html

  • OSB defaulting Content-Type to "multipart/related" in case of attachments

    I have scenario where I need to invoke a REST Webservice from OSB which accepts only media types which has "multipart/atom+xml". OSB is used for protocol transformation converting the SOAP request into the HTTP POST request with multipart. I have Proxy Service which will unwrap the message from the SOAP Body and post the same message into the payload of the Business Service and the attachment is passed 'as is' from the SOAP Service. The external REST Service Provider expects the media type to be "multipart/atom+xml", but in OSB when an attachment is present in the message, OSB is overrding the "Content-Type" proeprty to "multipart/related" inspite of me setting the "Content-Type" property of HTTP Transport Header in OSB and as result external RESTFUL Service is throwing "415-Unsupported Media Type" error. Below is the test results. One interesting thing is, it happens only when there is attachment present in the message. In case of a message which doesn't have attachment any "Content-Type" specified in the Transport Header is passed by the OSB to the external service. Any help is highly appreciated.
    OSB Transport Header
    Added the header <http:Content-Type>multipart/atom+xml</http:Content-Type>
    Actual Raw Message
    POST http://xxx7200:7004/XXXInterfaces/identify HTTP/1.1
    Content-Type: multipart/related; type="text/plain"; start="<Root_-328322390>"; boundary=MIME_Boundary; charset=UTF-8
    MIME-Version: 1.0
    User-Agent: Java1.6.0_17
    Host: xxx7200:7004
    Accept: text/html, image/gif, image/jpeg, */*; q=.2
    Proxy-Connection: Keep-Alive
    Content-Length: 4823
    Expected Raw Message
    POST http://xxx7200:7004/XXXInterfaces/identify HTTP/1.1
    Content-Type: multipart/atom+xml; boundary=MIME_Boundary;
    User-Agent: Java1.6.0_17
    Host: xxx7200:7004
    Accept: text/html, image/gif, image/jpeg, */*; q=.2
    Proxy-Connection: Keep-Alive
    Content-Length: 4803
    -KC
    Edited by: 799459 on Apr 8, 2011 5:36 AM
    Edited by: 799459 on Apr 8, 2011 7:02 AM
    Edited by: 799459 on Apr 8, 2011 7:13 AM
    Edited by: 799459 on Apr 8, 2011 7:14 AM

    HTTP content-type header has the following limitation as per osb doc.
    Oracle Service Bus run time may overwrite these headers in the binding layer when preparing the message for dispatch. If these headers are modified, $inbound and $outbound are updated accordingly. So what you are seeing may be working as designed. Cant the remote service accept the multi part related content type set up by osb ?

  • OSB: When does invokation from http Business Service result into an error

    Hi,
    I want to know when does invokation from http Business Service in OSB result into an error.
    I have a http based business service which is calling an external service on http url.
    I want to know when this business service is invoke/tested, what are the cases in which the invokation will result into an error.
    What does OSB read to cause the invokation an error.
    I am aware that it reads the http-response-code. If its not 200 or 0, it will result into an error.
    Want to validate this understanding and also want to know what are the other case that will cause this happen. Is it by any way dependent on body content?
    Please help. Please share any good links for the topics related to this.
    TIA.
    Regards,
    Ashish

    Hi,
    Some info here...
    http://svgonugu.wordpress.com/2011/06/15/fault-handling-in-osb/
    Cheers,
    Vlad

  • Osb 11 : How to configure tuxedo business services in a clustered domain.

    Hi,
    We have a platform with a clustered domain Osb ( 1 admin server and 2 managed servers dispatch on several physical servers) and two Tuxedo instances offering the same service exported in 2 different gateways on each Tuxedo instance.
    How to configure a business service with tuxedo transport working on this platform with failover and load balancing ?

    Thanks for the answer but it doesn't work.
    The fact is that we work on OSB 11, not directly in WebLogic.
    And Osb always modify the WTC configuration even if we modify it before in weblogic.
    To define a business service with multiple remote access points and apply a load balancing algorythm, Osb need an URI for each remote access point (not for each imported service).

  • OSB 10.3: proxy based on business service

    Hello there,
    the functionality to build a proxy based on a business service with Workshop10.3 seems to have "dissapeared" from ALSB 10 to OSB 10.3
    Is it a bug or feature? (Or is it one of the "things will be different at Oracle now.")
    As far as I can see it is nowhere documented.
    thanks,
    Barossa

    This is still not documented and very confusing since the old docs are distributed with the downloads of the current OSB AND the "Definitive Guide to OSB" by Davies also tells you to do it with the Wizard. ;-)
    Please document! But for this posting I would still be dazed and confused!!

  • OSB: Invoking multiple endpoint URIs or business service at same time

    Hi All,
    I want to route the request to two end point URIs or business services using OSB.
    Say for example, I have a BPEL which is deployed in two servers. Using this solution I have to invoke the deployed service in both servers as soon as I receive input.
    Please help.
    Thanks in Advance

    yes you can.
    1. place URIs in a xml. Save XML as a xquery resource say URICollection.xquery.
    2. assign this URICollection.xquery to a variable say URICollectionVariable.
    3. extract desired URIs using a xquery from URICollectionVariable. Two URIs can be stored inside one parent element, which can be output as result.
    4. replace business service URI with desired URI (from result) using "Routing options".
    To propagate request to two different locations, you need to use "for each" action. Run the "for loop" exactly two times, write logic for above item no.4- inside the for loop action.

  • Invalid Content Type Error for Web Service

    Hi Experts,
    We have a XI / PI Web Service, and have created an Adaptive Web Service Model for the same. For using this web service model, we have created a HTTP destination of type WSDL.
    This configuration works great in our development and consolidation server.
    While working with our production server, with all the settings same as consolidation server, the following error is generated for Web Service call. using the AWS model
    java.io.IOException: Invalid content type while requesting http://<host>:<port>/webdynpro/resources/<application_package>/guicall.wsdl. Expected Content-type: text/xml, received Content-type: content/unknown, used user to connect: null
    The HTTP destination address is the one specified in bold above.
    Also, in later part of the stack trace we are bale to see this error:
    com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WS metadata destination
    Please guide us on this issue.
    Best Regards,
    Alka.

    Hi Alka,
    How did you configure the Webservice Destinations in Visual Admin for a webservice explosed by XI system.
    I mean what was the URL specified, did you specify XI SYSTEM userid password ???
    How was the webservice published to inspection.wsil in XI system ??
    Thanks,
    Regards,
    Aditya Metukul

  • Soap proxy to jms business service response not available.

    Hi
    Please can anyone help me with this really urgent, help is greatly appreciated.
    We have one Proxy Service which takes in SOAP Request, and I have a route node in it which calls the biz service.
    Business service is a Messaging service built using jms queue and response URI is configured with jms out queue.
    If I run business service standalone it gets the message and response comes to out queue.
    if I run it through proxy service which routes to biz service, the message goes to biz service, and response goes to out queue, but I do not get response in http proxy.
    Please can someone help.
    thanks
    K.

    Basically the logic to consume msg requires full SOAP message as text, now when I use BS as Messaging Service it works fine because in test I put the full soap message as text. If I run it through Proxy it strips the header and sends only Body or if I base both my BS and PS using WSDL, then it attaches full soap message in multiple soap header and that causes the problem, so I have to remove extra header from message to have it processed correctly.
    this is my actual request:
    <SOAP-ENV:Envelope      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    the trace shows that request to BS is:
    <soapenv:Body      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Envelope      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    /SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    </soapenv:Body>
    so my message consumer has problem with extra soapenv:Body wrapper... any ideas will help.
    thanks
    K.

  • How to check error type in accessing web service?

    Dear all,
    I have created a form using WSDL connection to access web service in SOAP protocol.
    But I have difficulties in error handling when acccessing web service.
    I try to put a try catch block for the following statement :
    ie. xfa.connectionSet.WebServiceDC.execute(false);
    in case for any error, I can only catch message saying GeneralFault only.
    Is there any extra object in the script that I can catch to handle for different error type?
    e.g checking SOAP.? and where should I put the codes in?
    Actualy I want to detect if network connection is not ok or if it fails to find ecert which is required under https connection
    Rgds.

    Have you tried the try catch block ?
    See the error codes it responds with.
    Then look through the properties of the Exception
    try
        doInit();
    } catch(err)
        var vDebug = "";
        for (var prop in err)
           vDebug += "property: "+ prop+ " value: ["+ err[prop]+ "]\n";
        vDebug += "toString(): " + " value: [" + err.toString() + "]";
        status.rawValue = vDebug;
    function doInit()
        doWebServiceCallThatFails();
    Have fun with these articles
    http://blogs.adobe.com/formfeed/2009/06/collected_form_development_and.html
    http://blogs.adobe.com/formfeed/2009/03/handling_javascript_exceptions.html

  • Features to isolate OSB services from just one slow business service.

    Hi,
    Here is a OSB question around a quick business service that suddenly turn to be a slow one and the impact on the overall OSB performance.
    Suppose you have a critical OSB cluster in production with many proxy and business services.
    Because of requirements, you have a specific sync http business service (web service) that has an acceptable response time around 1 secs. But suddenly the response time goes to 30 secs or even more due to some problem, generating a great impact on thread and resource consumption on OSB side.
    Suppose a http time out configuration of 2 secs on the business service is just not enough. OSB continues to crash.
    You can use OSB throttling feature but doing that you have to fix a maximum concurrency.
    If the service implementation is down, OSB can handle that using "Offline Endpoint URIs" in the operational settings of sbconsole. But in this situation the service is online accepting requests. It's just slow to respond.
    This is a hypothetical situation just to stress the problem.
    Besides business service time-out configuration and throttling and dispatch-policies on proxy/business services are there any other features that can be used ?

    Wesley,
    Ok, once the business service request is sent, the thread is freed. When the response comes, a new thread is picked up to handle the business service response. So in the mean time there's no blocking thread. Yes. It is correct.
    Just to make sure, what about the waiting synchronous http client calling the proxy service ?
    I mean, this fire-and-forget feature works only on the business service side or entirely for the proxy/business service (That separation would not make sense I suppose) ? The same case with http proxy. The request thread will be used till the BS is invoked in the route node or end-of the request pipeline. After this thread is released. Once the response comes from the http bs on a different thread, that thread will be used till the end of the responsepipeline
    eg
    Client---->Http Proxy---->Thread1{Request Pipeline--->Routenode---->End of Request actions in the Routenode--->Call BS Request} ----->Thread2{BS gets response--->Response Pipeline --->send response back to the client}
    For example, a http client is waiting for the proxy service response, but while the business service does not respond, there is no blocking thread at all in the proxy service side too ?Yes. That is true
    So, there could be many waiting http clients calling this proxy service, all http business service requests sent, and no blocking threads ?Yes.
    What would be the drawbacks of this feature ?Nothing I can think off. Therotically we will be forced to do extra over head when BS latencies are low which might of little practical impact. In that case you can change QOS=Exactly once. BS request and response will be on the same thread , but proxy response thread will be always different from that of proxy request thread no matter what the QOS is set
    Cheers
    Manoj

  • External content type with web service - new read item operation disable

    Hi,
    i'm tring to create an external content type based on web service.
    I add for test the web service:
    http://www.webservicex.net/globalweather.asmx?WSDL
    when i try to set get reat item operation- it's disabled.
    what should i do in order to create the operations?
    keren tsur

    Hi,
    Please Provide screenshot about your issue.
    For more information about how to create an external content type based on a web service:
    http://msdn.microsoft.com/en-us/library/office/ee556431(v=office.14).aspx
    besides, here are two posts about defining read operation on External content type error, you can take a look at:
    https://social.technet.microsoft.com/Forums/en-US/f86a8f37-7c8c-4cf0-8722-c6d44aa1e3d8/defining-read-operation-on-external-content-type?forum=sharepointadmin
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/4bcc1cd9-a9d6-4171-87d9-c6749543749c/bcs-connecting-to-a-list-in-another-site-collection-using-the-wcf-service?forum=sharepointcustomizationprevious
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • How to set username/password in OSB Business Service

    Hi
    I need to call thirt party http service that utilizes Http Basic authentication i.e. username / password. If I call the same service through Oracle SOA I can either
    put the username/password inside composite.xml but that way the password is visible. So have set the usrname/password insid the console.
    Now want to use OSB to call the sam service. Created business service but where do I add the username/password. Is there a plac inside sbconsole I can set the username password.
    Thanks

    You must a "Service Account" available in OSB and assosciate it with the Business service you invoke.

  • Managed Metadata Service and Content Type Hubs - Service Connection necessary?

    I created a site collection and activated the content type hub feature at the site collection level. We have an existing managed metadata service but I am unable to edit its settings, so I created a new MMS in a new database, however; there is no "service
    connection" row below the MMS row for the new MMS Application, but there is one for the old MMS Application. Will this still work with my content type hub? If not, how can I get the service connection setting/row? I have to do this via PowerShell since
    the menus in the ribbon are not usable due to our JavaScript settings...

    Are you using Custom claim provider??
    If you are then try this:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/120ab535-63d2-4205-a51f-1987e9c0cf79/sharepoint-fba-the-content-type-texthtml-charsetutf8-of-the-response-message-does-not-match-the
    http://www.chapmanconsulting.ca/post/2010/04/23/The-Case-of-the-Failing-SharePoint-2010-FBA-Configuration.aspx
    #RoHsTr

Maybe you are looking for