2015-04-23 2 views
1

У меня есть две среды: локальная и UAT, которые являются веб-службой SOAP, развернуты на WAS 7. Ответ в локальном env . собственно, как он посылает только неисправность но UAT посылает то, что посылается в запросе + неисправности, что является нежелательнымРазличные ответы в разных средах

МЕСТНОГО

запрос

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://xmlns.scania.com/logistics/schema/transport/v1"> 
    <soapenv:Body> 
     <v1:TransportInformationRequest> 
     <!--1 or more repetitions:--> 
     <v1:ChassisNumber>9181398</v1:ChassisNumber> 
     </v1:TransportInformationRequest> 
    </soapenv:Body> 
</soapenv:Envelope> 

ответ

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> 
    <soapenv:Body> 
     <soapenv:Fault> 
     <faultcode>soapenv:Server</faultcode> 
     <faultstring>Faults indicating that the consumer agent is failed by a authentication or authorization mechanism.</faultstring> 
     <detail> 
      <SecurityFault> 
       <FaultTypeDescription>Faults indicating that the consumer agent is failed by a authentication or authorization mechanism.</FaultTypeDescription> 
       <CustomMessage>Security header not present in the SOAP request</CustomMessage> 
      </SecurityFault> 
     </detail> 
     </soapenv:Fault> 
    </soapenv:Body> 
</soapenv:Envelope> 

UAT

запрос

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://xmlns.scania.com/logistics/schema/transport/v1"> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <v1:TransportInformationRequest> 
     <!--1 or more repetitions:--> 
     <v1:ChassisNumber>9181398</v1:ChassisNumber> 
     </v1:TransportInformationRequest> 
    </soapenv:Body> 
</soapenv:Envelope> 

ответ

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://xmlns.scania.com/logistics/schema/transport/v1"> 
    <soapenv:Body> 
     <v1:TransportInformationRequest> 
     <!--1 or more repetitions:--> 
     <v1:ChassisNumber>9181398</v1:ChassisNumber> 
     </v1:TransportInformationRequest> 
     <soapenv:Fault> 
     <faultcode>soapenv:Server</faultcode> 
     <faultstring>Faults indicating that the consumer agent is failed by a authentication or authorization mechanism.</faultstring> 
     <detail> 
      <SecurityFault> 
       <FaultTypeDescription>Faults indicating that the consumer agent is failed by a authentication or authorization mechanism.</FaultTypeDescription> 
       <CustomMessage>Security header not present in the SOAP request</CustomMessage> 
      </SecurityFault> 
     </detail> 
     </soapenv:Fault> 
    </soapenv:Body> 
</soapenv:Envelope> 

Единственное различие мы могли бы определить был местный окр. возвращает 3 пространства имен xsd, xsi и soapenc в soapenvelope, тогда как UAT возвращает только пространство имен v1.

WSDL, является:

<?xml version="1.0" encoding="UTF-8"?> 
<definitions name="TransportInformationService" xmlns="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sch="http://xmlns.scania.com/logistics/schema/transport/v1" 
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:fault="http://xmlns.scania.com/common/schema/fault/v4" 
    xmlns:tns="http://xmlns.scania.com/logistics/contract/transport/v1" 
    xmlns:tns1="http://xmlns.scania.com/productdev/contract/part/v1" 
    targetNamespace="http://xmlns.scania.com/logistics/contract/transport/v1"> 

    <types> 
     <xsd:schema> 
      <xsd:import namespace="http://xmlns.scania.com/logistics/schema/transport/v1" 
       schemaLocation="logistics_transport_v1.xsd" /> 
     </xsd:schema> 
    </types> 

    <message name="GetTransportInformationRequest"> 
     <part element="sch:TransportInformationRequest" name="parameters" /> 
    </message> 

    <message name="GetTransportInformationResponse"> 
     <part element="sch:TransportInformationResponse" name="parameters" /> 
    </message> 

    <message name="EmptyChasisInformationFault"> 
     <part element="sch:EmptyChasisFault" name="fault" /> 
    </message> 

    <message name="UnknownServerFault"> 
     <part name="UnknownServerFault" element="sch:UnknownServerFault" /> 
    </message> 

    <message name="RequestMessageFormatFault"> 
     <part name="RequestMessageFormatFault" element="sch:RequestMessageFormatFault" /> 
    </message> 

    <message name="NonExistingEntityFault"> 
     <part name="NonExistingEntityFault" element="sch:NonExistingEntityFault" /> 
    </message> 

    <message name="SystemResourceUnavailableFault"> 
     <part name="SystemResourceUnavailableFault" element="sch:SystemResourceUnavailableFault" /> 
    </message> 

    <message name="SecurityFault"> 
     <part name="SecurityFault" element="sch:SecurityFault" /> 
    </message> 


    <portType name="TransportInformationDelegate"> 
     <operation name="GetTransportInformation"> 
      <input message="tns:GetTransportInformationRequest" /> 
      <output message="tns:GetTransportInformationResponse" /> 
      <fault message="tns:EmptyChasisInformationFault" name="EmptyChasisInformationFault"/> 
      <fault name="SystemResourceUnavailableFault" message="tns:SystemResourceUnavailableFault"/> 
      <fault name="NonExistingEntityFault" message="tns:NonExistingEntityFault"/> 
      <fault name="RequestMessageFormatFault" message="tns:RequestMessageFormatFault"/> 
      <fault name="UnknownServerFault" message="tns:UnknownServerFault"/> 
      <fault name="SecurityFault" message="tns:SecurityFault"/> 
     </operation> 

    </portType> 

    <binding name="TransportInformationPortBinding" type="tns:TransportInformationDelegate"> 
     <soap:binding style="document" 
      transport="http://schemas.xmlsoap.org/soap/http" /> 
     <operation name="GetTransportInformation"> 
      <soap:operation 
       soapAction="http://xmlns.scania.com/logistics/contract/transport/v1/GetTransportInformation" /> 
      <input> 
       <soap:body use="literal" /> 
      </input> 
      <output> 
       <soap:body use="literal" /> 
      </output> 
      <fault name="EmptyChasisInformationFault"> 
       <soap:fault name="EmptyChasisInformationFault" use="literal" /> 
      </fault> 
      <fault name="SystemResourceUnavailableFault"> 
       <soap:fault name="SystemResourceUnavailableFault" use="literal"/> 
      </fault> 
      <fault name="NonExistingEntityFault"> 
       <soap:fault name="NonExistingEntityFault" use="literal"/> 
      </fault> 
      <fault name="RequestMessageFormatFault"> 
       <soap:fault name="RequestMessageFormatFault" use="literal"/> 
      </fault> 
      <fault name="UnknownServerFault"> 
       <soap:fault name="UnknownServerFault" use="literal"/> 
      </fault> 
      <fault name="SecurityFault"> 
       <soap:fault name="SecurityFault" use="literal"/> 
      </fault> 
     </operation> 

    </binding> 

    <service name="TransportInformationService"> 
     <port binding="tns:TransportInformationPortBinding" name="TransportInformationPort"> 
      <soap:address 
       location="http://localhost:9081/SoleilWS.WEB/TransportInformationService" /> 
     </port> 
    </service> 

</definitions> 

XSD:

<?xml version="1.0" encoding="UTF-8"?> 
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    elementFormDefault="qualified" xmlns:types="http://ws.soleil.scania.com/" 
    xmlns="http://xmlns.scania.com/logistics/schema/transport/v1" 
    targetNamespace="http://xmlns.scania.com/logistics/schema/transport/v1"> 

    <xs:complexType name="chassisInfo"> 
     <xs:sequence> 
      <xs:element name="ChassisNumber" type="xs:int" /> 
      <xs:element name="TransportLegs" maxOccurs="unbounded"> 
       <xs:complexType> 
        <xs:sequence> 
         <xs:element name="From" type="xs:string" /> 
         <xs:element name="To" type="xs:string" /> 
         <xs:element name="OutsideEU" type="xs:boolean" /> 
         <xs:element name="ModeOfTransport" type="xs:string" /> 
         <xs:element name="NameOfTransport" type="xs:string" 
          minOccurs="0" /> 
         <xs:element name="NationalityOfTransport" minOccurs="0"> 
          <xs:simpleType> 
           <xs:restriction base="xs:string"> 
            <xs:annotation> 
             <xs:documentation>Two character ISO 3166-1 code for the 
              nationality of the transport 
             </xs:documentation> 
            </xs:annotation> 
            <xs:length value="2" /> 
           </xs:restriction> 
          </xs:simpleType> 
         </xs:element> 
         <xs:element name="Departure" type="xs:dateTime" 
          minOccurs="0" /> 
         <xs:element name="EstimateTimeOfArrival" type="xs:dateTime" 
          minOccurs="0" /> 
        </xs:sequence> 
       </xs:complexType> 
      </xs:element> 
     </xs:sequence> 
    </xs:complexType> 



    <xs:element name="TransportInformationRequest"> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:element name="ChassisNumber" type="xs:int" maxOccurs="unbounded" /> 
      </xs:sequence> 
     </xs:complexType> 
    </xs:element> 

    <xs:element name="TransportInformationResponse"> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:element name="Chassis" type="chassisInfo" maxOccurs="unbounded" /> 
      </xs:sequence> 
     </xs:complexType> 
    </xs:element> 

    <xs:element name="EmptyChasisFault"> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:element minOccurs="0" name="message" type="xs:string" /> 
      </xs:sequence> 
     </xs:complexType> 
    </xs:element> 

    <xs:simpleType name="CustomMessage"> 
     <xs:restriction base="xs:string" /> 
    </xs:simpleType> 

    <xs:simpleType name="FaultTypeDescription"> 
     <xs:restriction base="xs:string" /> 
    </xs:simpleType> 

    <xs:element name="RequestMessageFormatFault"> 
    <xs:complexType> 
     <xs:sequence> 
      <xs:element 
       fixed="Request message format validation fault. Note that there may be other fault message types capturing faults for more specific request message problems." 
       name="FaultTypeDescription" type="FaultTypeDescription" /> 
      <xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" /> 
     </xs:sequence> 
    </xs:complexType> 
    </xs:element> 

    <xs:element name="SystemResourceUnavailableFault"> 
    <xs:complexType> 
     <xs:sequence> 
      <xs:element 
       fixed="Faults which are of temporary character and not caused by incorrect request messages. This message may be used to communicate that the client can expect an invocation with the same request message to work at a later time. Example: required resource of the service realization, such as a database or another service, is temporarily inaccessible." 
       name="FaultTypeDescription" type="FaultTypeDescription" /> 
      <xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" /> 
     </xs:sequence> 
    </xs:complexType> 
    </xs:element> 

    <xs:element name="UnknownServerFault"> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:element 
        fixed="Faults which are not classified to any other category. Note that there may be, although so should be avoided when possible, other undeclared fault message types as well." 
        name="FaultTypeDescription" type="FaultTypeDescription" /> 
       <xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" /> 
      </xs:sequence> 
     </xs:complexType> 
    </xs:element> 

    <xs:element name="NonExistingEntityFault"> 
    <xs:complexType> 
     <xs:sequence> 
      <xs:element 
       fixed="Faults indicating that the request message is referencing an entity not existing in the service datastore." 
       name="FaultTypeDescription" type="FaultTypeDescription" /> 
      <xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" /> 
     </xs:sequence> 
    </xs:complexType> 
    </xs:element> 

    <xs:element name="InvalidReferenceFault"> 
    <xs:complexType> 
     <xs:annotation> 
      <xs:documentation>This fault may be extended using specific faults 
       for specific, or specific groups of, foreign keys. 
      </xs:documentation> 
     </xs:annotation> 
     <xs:sequence> 
      <xs:element 
       fixed="Faults indicating that the entity contained in the request has an invalid reference to another entity." 
       name="FaultTypeDescription" type="FaultTypeDescription" /> 
      <xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" /> 
     </xs:sequence> 
    </xs:complexType> 
    </xs:element> 

    <xs:element name="NotSupportedForEntityStateFault"> 
    <xs:complexType> 
     <xs:annotation> 
      <xs:documentation>This fault may be extended using specific faults 
       for specific, or specific groups of, state-machine rules. 
      </xs:documentation> 
     </xs:annotation> 
     <xs:sequence> 
      <xs:element 
       fixed="Faults indicating that the operation issued on an entity is not permitted due to the state of the same entity." 
       name="FaultTypeDescription" type="FaultTypeDescription" /> 
      <xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" /> 
     </xs:sequence> 
    </xs:complexType> 
    </xs:element> 

    <xs:element name="SecurityFault"> 
    <xs:complexType> 
     <xs:annotation> 
      <xs:documentation>This fault may be extended for specific security 
       faults. Remember, however, that revealing too much information on 
       the inner workings of a security mechanism in fault messages may 
       risk the security of the solution. 
      </xs:documentation> 
     </xs:annotation> 
     <xs:sequence> 
      <xs:element 
       fixed="Faults indicating that the consumer agent is failed by a authentication or authorization mechanism." 
       name="FaultTypeDescription" type="FaultTypeDescription" /> 
      <xs:element minOccurs="0" name="CustomMessage" type="CustomMessage" /> 
     </xs:sequence> 
    </xs:complexType> 
    </xs:element> 

</xs:schema> 

Почему разница между ответами?

ответ

0

В чем разница в окружающей среде? Проверьте уровень пакета обновления WAS, уровень пакета обновления JVM, версии пакета функций, конфигурацию WAS и т. Д. У обеих сетей одинаковый доступ к сети?

Есть ли в ваших журналах какие-либо отличия? Возможно, вы можете увеличить уровни регистрации или включить трассировку WAS, чтобы определить причину ошибочного поведения.

Смежные вопросы