the soap message is SOAP1.2 complaint..
but theres something wrong with the App Server incase of a HTTP Request



________________________________
From: Martin Gainty <[email protected]>
To: [email protected]
Sent: Sat, 19 March, 2011 4:06:33 AM
Subject: RE: [AXIS2] :Mismatched header type

 Service Stub:
    protected static SOAPFactory getFactory(String soapVersionURI) {
        if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapVersionURI)) 
{ //http://schemas.xmlsoap.org/soap/envelope/
            return OMAbstractFactory.getSOAP11Factory();
   } else if 
(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapVersionURI)) { 
//http://www.w3.org/2003/05/soap-envelope
            return OMAbstractFactory.getSOAP12Factory();
        } else {
            throw new RuntimeException(Messages
                    .getMessage("unknownsoapversion"));
        }
    }

//SOAP11 (content-type=text/xml)
<!--
The following is an example of a SOAP11 message compliant with the above WSDL 
for the logEvent request:


  <s:Body>
    
      <m:DemoUserID>My Id is 72+1111,AF37C.sdsdsd</m:DemoUserID>
      WarehouseA:http://www.ws-i.org/SA/Warehouse.asmx
      <m:EventID>3</m:EventID>
      <m:EventDescription>Initiating operation ShipGoods.</m:EventDescription>
      
        <d:Customer>D22845-W8N349Y-tky</d:Customer>
        <d:ProductId>123123123</d:ProductId>
        <d:Quantity>12</d:Quantity>
      </d:Detail>
    </m:logEventRequestElement>
  </s:Body>
</s:Envelope>

//SOAP12 ( content-type=application/soap+xml) ( namespace assignment of 
xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>)

<?xml version="1.0" encoding="utf-8" ?>
<description
    xmlns="http://www.w3.org/2006/01/wsdl";
    targetNamespace= "http://greath.example.com/2004/wsdl/resSvc";
    xmlns:tns= "http://greath.example.com/2004/wsdl/resSvc";
    xmlns:ghns = "http://greath.example.com/2004/schemas/resSvc";
    xmlns:wsoap= "http://www.w3.org/2006/01/wsdl/soap";
    xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>

  <documentation>
    This document describes the GreatH Web service.  Additional
    application-level requirements for use of this service --
    beyond what WSDL 2.0 is able to describe -- are available
    at http://greath.example.com/2004/reservation-documentation.html
  </documentation>

  <types>
    <xs:schema
        xmlns:xs="http://www.w3.org/2001/XMLSchema";
        targetNamespace="http://greath.example.com/2004/schemas/resSvc";
        xmlns="http://greath.example.com/2004/schemas/resSvc";>

      <xs:element name="checkAvailability" type="tCheckAvailability"/>
      <xs:complexType name="tCheckAvailability">
        <xs:sequence>
          <xs:element  name="checkInDate" type="xs:date"/>
          <xs:element  name="checkOutDate" type="xs:date"/>
          <xs:element  name="roomType" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>

      <xs:element name="checkAvailabilityResponse" type="xs:double"/>

      <xs:element name="invalidDataError" type="xs:string"/>

    </xs:schema>
  </types>
  <interface  name = "reservationInterface" >
    <fault name = "invalidDataFault"
            element = "ghns:invalidDataError"/>
    <operation name="opCheckAvailability"
            pattern="http://www.w3.org/2006/01/wsdl/in-out"; >
        <input messageLabel="In"
              element="ghns:checkAvailability" />
        <output messageLabel="Out"
              element="ghns:checkAvailabilityResponse" />
        <outfault ref="tns:invalidDataFault" messageLabel="Out"/>
    </operation>
  </interface>
  <binding name="reservationSOAPBinding"
      interface="tns:reservationInterface"
      type="http://www.w3.org/2004/08/wsdl/soap12";
      wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP";>
    <operation ref="tns:opCheckAvailability"
      wsoap:mep="http://www.w3.org/2006/01/wsdl/in-out"/>
    <fault ref="tns:invalidDataFault"
      wsoap:code="soap:Sender"/>
  </binding>
  <service name="reservationService"
       interface="tns:reservationInterface">
     <endpoint name="reservationEndpoint"
               binding="tns:reservationSOAPBinding"
               address ="http://greath.example.com/2004/reservation"/>
  </service>
</description>

so assigning a namespace from a known SOAP12 namespace will assign content-type 
application/soap+xml
instead of text/xml

does this conform to the behaviour of your namespaces?

Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




________________________________
Date: Sat, 19 Mar 2011 00:21:22 +0530
From: [email protected]
Subject: [AXIS2] :Mismatched header type
To: [email protected]






I have a IBM APP Server
when i send a web service call to the server, through HTTP Server
the header in the soap message returned is text/xml, which causes a SOAP 
Transport URI error at my client side.
What can be the reason for the application server to return text/xml in soap 
response. ?
The call is a SOAP 1.2 Call


Thanks 

Reply via email to