0

私は Web サービスを使用するのはかなり初めてで、ws クライアント プラグインを使用してサード パーティの Web サービス用のクライアントを開発しようとしています。ドキュメントの例を試してみたところ、すべてうまくいきましたが、上記の Web サービスを使用しようとすると、次の例外が発生します。

| Error 2013-05-06 11:03:22,853 [http-bio-8080-exec-1] ERROR errors.GrailsExceptionResolver  - DOMException occurred when processing request: [GET] /webgains/webgains/index
NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.. Stacktrace follows:
Message: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
    Line | Method
->> 2530 | checkDOMNSErr                      in com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    117 | setName                            in com.sun.org.apache.xerces.internal.dom.AttrNSImpl
|     78 | <init> . . . . . . . . . . . . . . in     ''
|   2142 | createAttributeNS                  in com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl
|    659 | setAttributeNS . . . . . . . . . . in com.sun.org.apache.xerces.internal.dom.ElementImpl
|    470 | serializeAttribute                 in org.apache.ws.commons.schema.XmlSchemaSerializer
|    832 | serializeComplexContentRestriction in     ''
|    682 | serializeComplexContent            in     ''
|    903 | serializeComplexType . . . . . . . in     ''
|   2400 | serializeSchemaChild               in     ''
|   1659 | serializeSchemaElement . . . . . . in     ''
|    132 | serializeSchema                    in     ''
|    478 | addSchemas . . . . . . . . . . . . in org.apache.cxf.endpoint.dynamic.DynamicClientFactory
|    316 | createClient                       in     ''
|    235 | createClient . . . . . . . . . . . in     ''
|    214 | createClient                       in     ''
|    198 | createClient . . . . . . . . . . . in groovyx.net.ws.AbstractCXFWSClient
|    107 | initialize                         in groovyx.net.ws.WSClient
|     19 | getClient . . . . . . . . . . . .  in org.grails.plugins.wsclient.service.WebService
|     10 | index                              in webgains.WebgainsController
|    195 | doFilter . . . . . . . . . . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter                           in grails.plugin.cache.web.filter.AbstractFilter
|   1110 | runWorker . . . . . . . . . . . .  in java.util.concurrent.ThreadPoolExecutor
|    603 | run                                in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run . . . . . . . . . . . . . . .  in java.lang.Thread

少し調べてみたところ、場合によっては xalan-2.7.0.jar を追加すると問題が解決することがわかりました。私はそれを試しましたが、まだ動作しません。

何か案は?

編集:

私は次のコードを使用しています:

def wsdlURL = "http://ws.webgains.com/aws.php"
def proxy = webService.getClient(wsdlURL)

def result = proxy.getFullUpdatedEarnings(new GregorianCalendar(),new GregorianCalendar(),1,"a","b")

例外は webService.getClient(wsdlURL) でスローされます

4

0 に答える 0