2012-01-03 10 views
0

Visual Studio 2010を使用してVisual Basicで作成されたWCFサービスがあります。このWebサービスをJavaからSOAP経由で呼び出したいとします。これを行うために、私はjdkからwsimportに仕事をさせました。今私は、私のWerbserviceのtargetNamespaceが "tempuri.org"、VSのデフォルトの名前空間URIとして記述されているという問題があります。Visual Studio 2010で生成されたWSDLでtargetNamespaceを変更する方法

<wsdl:definitions name="SearchService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:i0="http://xxx.de/SearchTool" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"> 

私はあなたのいくつかはことを願って:私は何を知っている必要があり、私は

Exception in thread "main" javax.xml.ws.WebServiceException: SearchService is not a valid service. Valid services are: {http://tempuri.org/}SearchService 
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source) 
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source) 
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown Source) 
at javax.xml.ws.Service.<init>(Unknown Source) 
at org.tempuri.SearchService.<init>(SearchService.java:42) 
at def.Call.main(Call.java:22) 

のように接続しようとして素敵なエラーが出るようWSDLは次のようになり、Visual Studioの中でそれを変更する方法であり、私がここで紛失しているものを見つけ出してください...

答えて

1

私はエラー自体についてはわかりませんが、私はVisual Studioによって生成されたすべてのtempuri.orgの参照に夢中になりました。

This articleは、メソッド/クラスを装飾するために必要な属性と、生成されるWSDLにどのように影響するかを示しています。

+0

非常に役に立ちます。ありがとう! 私はそれを試し、私はそれが私の問題を解決するかどうかを見てみましょう... – Maltram

+0

あなたのリンクとこの[素敵なツール]でそれをやったことがあります(http://developers.de/blogs/damir_dobric/archive/2011/10/ 09/flatten-wcf-wsdl.aspx) – Maltram