微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

找不到

如何解决找不到

我一直致力于实现在爱立信 EDA 服务器上使用的 SOAP 服务。我在 EDA 服务器上运行该服务,并且我正在使用 SOAP-UI 进行测试。但是当我尝试调用方法时,我一直遇到这个错误。如果我在 SOAP-UI 中创建 mockService 并测试它是否有效。

我做错了什么?

错误信息

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cai3g="http://schemas.ericsson.com/cai3g1.2/">
   <S:Header>
      <cai3g:SessionId>0987654321778</cai3g:SessionId>
   </S:Header>
   <S:Body>
      <ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
         <faultcode>ns2:Client</faultcode>
         <faultstring>Cannot find dispatch method for {http://schemas.ericsson.com/cai3g1.2/}CFU</faultstring>
      </ns2:Fault>
   </S:Body>
</S:Envelope>

我的 SOAP-UI 请求

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cai3="http://schemas.ericsson.com/cai3g1.2/" xmlns:gsm="http://schemas.ericsson.com/ma/CA/gsmCallForwardService/">
   <soapenv:Header>
      <cai3:SessionId>0987654321778</cai3:SessionId>
   </soapenv:Header>
   <soapenv:Body>
      <cai3:CFU>
         <cai3:MOType>Subscriber@http://schemas.ericsson.com/ma/CA/gsmCallForwardService/</cai3:MOType>
         <cai3:MOId>
            <gsm:imsi>123456789012345</gsm:imsi>
         </cai3:MOId>
         <cai3:MOAttributes>
            <gsm:SetSubscriberCfu imsi="123456789012345">
               <gsm:imsi>123456789012345</gsm:imsi>
               <gsm:msisdn>7770101</gsm:msisdn>
               <gsm:fnum>7770202</gsm:fnum>
            </gsm:SetSubscriberCfu>
         </cai3:MOAttributes>
      </cai3:CFU>
   </soapenv:Body>
</soapenv:Envelope>

我在下面添加了我的 WSDL 和 XSD 文件,如果它们对解决问题有任何用处。

gsmCallForwardService.wsdl

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<deFinitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:cai3g="http://schemas.ericsson.com/cai3g1.2/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:pg="http://schemas.ericsson.com/pg/1.0" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.ericsson.com/cai3g1.2/">
    <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
        <!-- disable wrapper style generation -->
        <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
    </jaxws:bindings>
    <types>
        <xs:schema xmlns="http://schemas.ericsson.com/cai3g1.2/" xmlns:gsmCallForwardService="http://schemas.ericsson.com/ma/CA/gsmCallForwardService/" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://schemas.ericsson.com/cai3g1.2/">
            <xs:import namespace="http://schemas.ericsson.com/ma/CA/gsmCallForwardService/" schemaLocation="../schemas/gsmCallForwardService.xsd"/>
            <xs:import namespace="http://schemas.ericsson.com/pg/1.0" schemaLocation="../schemas/PGFault.xsd"/>
            <xs:element name="CFU">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element fixed="Subscriber@http://schemas.ericsson.com/ma/CA/gsmCallForwardService/" name="MOType" type="xs:string"/>
                        <xs:element name="MOId">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element ref="gsmCallForwardService:imsi"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element minOccurs="1" name="MOAttributes">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element ref="gsmCallForwardService:SetSubscriberCfu"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="CreateResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="MOId">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element ref="gsmCallForwardService:imsi"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element minOccurs="1" name="MOAttributes">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element ref="gsmCallForwardService:SetCfResponseSubscriber"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="Cai3gFault">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="faultcode" type="xs:integer"/>
                        <xs:element name="faultreason">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element maxOccurs="unbounded" name="reasonText" type="xs:string"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="faultrole" type="xs:string"/>
                        <xs:element minOccurs="0" name="details">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element ref="pg:PGFault"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="SessionId" type="SessionIdType"/>
            <xs:element name="TransactionId" type="xs:unsignedLong"/>
            <xs:element name="SequenceId" type="xs:unsignedLong"/>
            <xs:simpleType name="SessionIdType">
                <xs:restriction base="xs:string">
                    <xs:pattern value="[\d\w]{1,}"/>
                </xs:restriction>
            </xs:simpleType>
            <xs:complexType name="HeaderFaultType">
                <xs:sequence>
                    <xs:element name="faultactor" type="xs:string"/>
                    <xs:element name="description" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
            <xs:element name="SessionIdFault">
                <xs:complexType>
                    <xs:complexContent>
                        <xs:extension base="HeaderFaultType">
                            <xs:sequence>
                                <xs:element name="faultcode">
                                    <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                            <xs:enumeration value="Invalid SessionId"/>
                                            <xs:enumeration value="Session Timeout"/>
                                            <xs:enumeration value="SessionId Syntax Error"/>
                                        </xs:restriction>
                                    </xs:simpleType>
                                </xs:element>
                            </xs:sequence>
                        </xs:extension>
                    </xs:complexContent>
                </xs:complexType>
            </xs:element>
            <xs:element name="SequenceIdFault">
                <xs:complexType>
                    <xs:complexContent>
                        <xs:extension base="HeaderFaultType">
                            <xs:sequence>
                                <xs:element name="faultcode">
                                    <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                            <xs:enumeration value="Invalid SequenceId"/>
                                        </xs:restriction>
                                    </xs:simpleType>
                                </xs:element>
                            </xs:sequence>
                        </xs:extension>
                    </xs:complexContent>
                </xs:complexType>
            </xs:element>
            <xs:element name="TransactionIdFault">
                <xs:complexType>
                    <xs:complexContent>
                        <xs:extension base="HeaderFaultType">
                            <xs:sequence>
                                <xs:element name="faultcode">
                                    <xs:simpleType>
                                        <xs:restriction base="xs:string">
                                            <xs:enumeration value="Invalid TransactionId"/>
                                        </xs:restriction>
                                    </xs:simpleType>
                                </xs:element>
                            </xs:sequence>
                        </xs:extension>
                    </xs:complexContent>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    </types>
    <message name="CreateRequest">
        <part element="cai3g:CFU" name="parameters"/>
    </message>
    <message name="CreateResponse">
        <part element="cai3g:CreateResponse" name="parameters"/>
    </message>
    <message name="HeadInfo">
        <part element="cai3g:SessionId" name="sessionId"/>
        <part element="cai3g:TransactionId" name="transactionId"/>
        <part element="cai3g:SequenceId" name="sequenceId"/>
    </message>
    <message name="Cai3gFault">
        <part element="cai3g:Cai3gFault" name="parameters"/>
    </message>
    <message name="Cai3gHeaderFault">
        <part element="cai3g:SessionIdFault" name="sessionIdFault"/>
        <part element="cai3g:TransactionIdFault" name="transactionIdFault"/>
        <part element="cai3g:SequenceIdFault" name="sequenceIdFault"/>
    </message>
    <portType name="Subscriber">
        <operation name="CFU">
            <input message="cai3g:CreateRequest"/>
            <output message="cai3g:CreateResponse"/>
            <fault message="cai3g:Cai3gFault" name="Cai3gFault"/>
        </operation>
    </portType>
    <binding name="Subscriber" type="cai3g:Subscriber">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="CFU">
            <soap:operation soapAction="CAI3G#CFU" style="document"/>
            <input>
                <soap:body use="literal"/>
                <soap:header message="cai3g:HeadInfo" part="sessionId" use="literal"/>
                <soap:header message="cai3g:HeadInfo" part="transactionId" use="literal"/>
                <soap:header message="cai3g:HeadInfo" part="sequenceId" use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
                <soap:header message="cai3g:HeadInfo" part="sessionId" use="literal">
                    <soap:headerfault message="cai3g:Cai3gHeaderFault" part="sessionIdFault" use="literal"/>
                </soap:header>
                <soap:header message="cai3g:HeadInfo" part="transactionId" use="literal">
                    <soap:headerfault message="cai3g:Cai3gHeaderFault" part="transactionIdFault" use="literal"/>
                </soap:header>
                <soap:header message="cai3g:HeadInfo" part="sequenceId" use="literal">
                    <soap:headerfault message="cai3g:Cai3gHeaderFault" part="sequenceIdFault" use="literal"/>
                </soap:header>
            </output>
            <fault name="Cai3gFault">
                <soap:fault name="Cai3gFault" use="literal"/>
            </fault>
        </operation>
    </binding>
    <service name="Provisioning">
        <port binding="cai3g:Subscriber" name="Subscriber">
            <soap:address location="http://127.0.0.1:8080/CAI3G1.2/services/CAI3G1.2"/>
        </port>
    </service>
</deFinitions>

gsmCallForwardService.xsd

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.ericsson.com/ma/CA/gsmCallForwardService/" xmlns:cai3g="http://schemas.ericsson.com/cai3g1.2/" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:ns1="http://schemas.ericsson.com/ma/CA/gsmCallForwardService/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" attributeFormDefault="unqualified" elementFormDefault="qualified" jaxb:version="2.0" targetNamespace="http://schemas.ericsson.com/ma/CA/gsmCallForwardService/">
    <xs:include schemaLocation="gsmCallForwardService_types.xsd"/>
    <xs:element name="imsi" type="ns1:imsiType"/>
    <xs:element name="msisdn" type="ns1:msisdnType"/>
    <xs:element name="fnum" type="ns1:fnumType"/>
    <xs:element name="responseCode" type="ns1:responseCodeType"/>
    <xs:element name="SetSubscriberCfu">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="imsi" type="ns1:imsiType"/>
                <xs:element name="msisdn" type="ns1:msisdnType"/>
                <xs:element name="fnum" type="ns1:fnumType"/>
            </xs:sequence>
            <xs:attribute name="imsi" type="ns1:imsiType" use="required">
                <xs:annotation>
                    <xs:appinfo>
                        <jaxb:property name="imsiAttr"/>
                    </xs:appinfo>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
    <xs:element name="SetCfResponseSubscriber">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="responseCode" type="ns1:responseCodeType"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

gsmCallForwardService_types.xsd

<?xml version="1.0" encoding="UTF-8" standalone="no"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
    <!-- General types. -->
    <xs:simpleType name="msisdnType">
        <xs:restriction base="xs:string">
            <xs:minLength value="5"/>
            <xs:maxLength value="15"/>
            <xs:pattern value="[0-9]*"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="imsiType">
        <xs:restriction base="xs:string">
            <xs:minLength value="6"/>
            <xs:maxLength value="15"/>
            <xs:pattern value="[0-9]*"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="responseCodeType">
        <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="6"/>
            <xs:pattern value="[0-9]*"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="fnumType">
        <xs:restriction base="xs:string">
            <xs:minLength value="5"/>
            <xs:maxLength value="15"/>
            <xs:pattern value="[0-9]*"/>
        </xs:restriction>
    </xs:simpleType>
</xs:schema>

PGFault.xsd

<?xml version="1.0" encoding="UTF-8" standalone="no"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.ericsson.com/pg/1.0" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://schemas.ericsson.com/pg/1.0">
    <xs:element name="PGFault">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="errorcode" type="xs:integer"/>
                <xs:element name="errormessage" type="xs:string"/>
                <xs:choice>
                    <xs:element name="errordetails" type="xs:string"/>
                    <xs:element maxOccurs="unbounded" ref="failinformation"/>
                </xs:choice>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="failinformation">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="errorcode" type="xs:integer"/>
                <xs:element name="errormessage" type="xs:string"/>
                <xs:choice>
                    <xs:element name="errordetails" type="xs:string"/>
                    <xs:element maxOccurs="unbounded" ref="failinformation"/>
                </xs:choice>
            </xs:sequence>
            <xs:attribute name="taskname" type="xs:string" use="required"/>
            <xs:attribute name="action" type="xs:string" use="required"/>
        </xs:complexType>
    </xs:element>   
</xs:schema>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。