我的网络应用程序有以下wsdl代码:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:tns="http://www.ebi.ac.uk/webservices/whatizit/ws"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://www.ebi.ac.uk/webservices/whatizit/ws" name="whatizit">
<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.ebi.ac.uk/webservices/whatizit/ws"
version="1.0">
<xs:element xmlns:ns1="http://www.ebi.ac.uk/webservices/whatizit/ws"
type="ns1:search" name="search" />
<xs:complexType name="search">
<xs:sequence>
<xs:element type="xs:string" minOccurs="0" name="pipelineName" />
<xs:element type="xs:string" minOccurs="0" name="query" />
<xs:element name="limit">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0" />
<xs:maxExclusive value="10000" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element xmlns:ns2="http://www.ebi.ac.uk/webservices/whatizit/ws"
type="ns2:searchResponse" name="searchResponse" />
<xs:complexType name="searchResponse">
<xs:sequence>
<xs:element type="xs:string" minOccurs="0" name="return" />
</xs:sequence>
</xs:complexType>
<xs:element xmlns:ns3="http://www.ebi.ac.uk/webservices/whatizit/ws"
type="ns3:WhatizitException" name="WhatizitException" />
<xs:complexType name="WhatizitException">
<xs:sequence>
<xs:element type="xs:string" minOccurs="0" name="message" />
</xs:sequence>
</xs:complexType>
<xs:element xmlns:ns4="http://www.ebi.ac.uk/webservices/whatizit/ws"
type="ns4:contact" name="contact" />
<xs:complexType name="contact">
<xs:sequence>
<xs:element type="xs:string" minOccurs="0" name="pipelineName" />
<xs:element type="xs:string" minOccurs="0" name="text" />
<xs:element type="xs:boolean" name="convertToHtml" />
</xs:sequence>
</xs:complexType>
<xs:element xmlns:ns5="http://www.ebi.ac.uk/webservices/whatizit/ws"
type="ns5:contactResponse" name="contactResponse" />
<xs:complexType name="contactResponse">
<xs:sequence>
<xs:element type="xs:string" minOccurs="0" name="return" />
</xs:sequence>
</xs:complexType>
<xs:element xmlns:ns6="http://www.ebi.ac.uk/webservices/whatizit/ws"
type="ns6:queryPmid" name="queryPmid" />
<xs:complexType name="queryPmid">
<xs:sequence>
<xs:element type="xs:string" minOccurs="0" name="pipelineName" />
<xs:element type="xs:string" minOccurs="0" name="pmid" />
</xs:sequence>
</xs:complexType>
<xs:element xmlns:ns7="http://www.ebi.ac.uk/webservices/whatizit/ws"
type="ns7:queryPmidResponse" name="queryPmidResponse" />
<xs:complexType name="queryPmidResponse">
<xs:sequence>
<xs:element type="xs:string" minOccurs="0" name="return" />
</xs:sequence>
</xs:complexType>
<xs:element xmlns:ns8="http://www.ebi.ac.uk/webservices/whatizit/ws"
type="ns8:getPipelinesStatus" name="getPipelinesStatus" />
<xs:complexType name="getPipelinesStatus" />
<xs:element xmlns:ns9="http://www.ebi.ac.uk/webservices/whatizit/ws"
type="ns9:getPipelinesStatusResponse" name="getPipelinesStatusResponse" />
<xs:complexType name="getPipelinesStatusResponse">
<xs:sequence>
<xs:element xmlns:ns10="http://www.ebi.ac.uk/webservices/whatizit/ws"
type="ns10:selectItem" minOccurs="0" name="return" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="selectItem">
<xs:sequence>
<xs:element type="xs:string" minOccurs="0" name="description" />
<xs:element type="xs:boolean" name="disabled" />
<xs:element type="xs:string" minOccurs="0" name="label" />
<xs:element type="xs:anyType" minOccurs="0" name="value" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
<message name="contact">
<part element="tns:contact" name="parameters" />
</message>
<message name="contactResponse">
<part element="tns:contactResponse" name="parameters" />
</message>
<message name="WhatizitException">
<part element="tns:WhatizitException" name="fault" />
</message>
<message name="getPipelinesStatus">
<part element="tns:getPipelinesStatus" name="parameters" />
</message>
<message name="getPipelinesStatusResponse">
<part element="tns:getPipelinesStatusResponse" name="parameters" />
</message>
<message name="queryPmid">
<part element="tns:queryPmid" name="parameters" />
</message>
<message name="queryPmidResponse">
<part element="tns:queryPmidResponse" name="parameters" />
</message>
<message name="search">
<part element="tns:search" name="parameters" />
</message>
<message name="searchResponse">
<part element="tns:searchResponse" name="parameters" />
</message>
<portType name="whatizit">
<operation name="contact">
<input message="tns:contact" />
<output message="tns:contactResponse" />
<fault message="tns:WhatizitException" name="WhatizitException" />
</operation>
<operation name="getPipelinesStatus">
<input message="tns:getPipelinesStatus" />
<output message="tns:getPipelinesStatusResponse" />
<fault message="tns:WhatizitException" name="WhatizitException" />
</operation>
<operation name="queryPmid">
<input message="tns:queryPmid" />
<output message="tns:queryPmidResponse" />
<fault message="tns:WhatizitException" name="WhatizitException" />
</operation>
<operation name="search">
<input message="tns:search" />
<output message="tns:searchResponse" />
<fault message="tns:WhatizitException" name="WhatizitException" />
</operation>
</portType>
<binding type="tns:whatizit" name="pipelineBinding">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="contact">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
<fault name="WhatizitException">
<soap:fault use="literal" name="WhatizitException" />
</fault>
</operation>
<operation name="getPipelinesStatus">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
<fault name="WhatizitException">
<soap:fault use="literal" name="WhatizitException" />
</fault>
</operation>
<operation name="queryPmid">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
<fault name="WhatizitException">
<soap:fault use="literal" name="WhatizitException" />
</fault>
</operation>
<operation name="search">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<mime:multipartRelated>
<mime:part>
<soap:body parts="" use="literal" />
</mime:part>
<mime:part>
<mime:content part="parameters" type="text/xml" />
</mime:part>
</mime:multipartRelated>
</output>
<fault name="WhatizitException">
<soap:fault use="literal" name="WhatizitException" />
</fault>
</operation>
</binding>
<service name="whatizit">
<port binding="tns:pipelineBinding" name="pipeline">
<!--<soap:address location="http://www.ebi.ac.uk/webservices/whatizit/ws"/> -->
<soap:address location="http://localhost:8080/whatizit/ws" />
</port>
</service>
</definitions>
现在我对使用WSDL的Web服务非常陌生。我遇到了两个我无法修复的错误:
<output>
<mime:multipartRelated>
<mime:part>
<soap:body parts="" use="literal" />
</mime:part>
<mime:part>
<mime:content part="parameters" type="text/xml" />
</mime:part>
</mime:multipartRelated>
</output>
在此行找到多个注释:
- cvc-attribute.3: The value '' of attribute 'parts' on element 'soap:body' is not valid with respect to its type,
'NMTOKENS'.
- cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type
'NMTOKENS'.
任何建议将不胜感激。谢谢你的帮助。
答案 0 :(得分:1)
最后,我设法解决了这个问题。基本上,Eclipse要求提交的部件是nmtokens类型。所以我改变了块:
<output>
<mime:multipartRelated>
<mime:part>
<soap:body parts="nmtokens" use="literal" />
</mime:part>
<mime:part>
<mime:content part="parameters" type="text/xml" />
</mime:part>
</mime:multipartRelated>
</output>
到
CREATE OR REPLACE FUNCTION
edm.automated_builder_update_trigger_manual()
RETURNS trigger AS
$BODY$
DECLARE
e record;
weekly_permit_table text := TG_ARGV[0];
BEGIN
Update edm.weekly_permit_table as a
set applicant = applicant||' '||'-'||' '||new.builder where
old.permit_number = split_part(a.permit_details, ' ',1);
RETURN NULL;
END;
错误消失了。