本文介绍了无法在SoapExtension中访问Soapheader的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我在从SoapExtension访问自定义SoapHeader时遇到问题。我的 扩展名没有编译时间参考来自 SoapHeader的类,那么如何将它转换为正确类型的SoapHeader? 谢谢, Andy 解决方案 XML。 John XML。 John XML。 好的,我道歉。我以为我有一个SOAP扩展,它以XML格式访问 标头。我错了,它作为SoapHeader派生的 对象访问它们。 所以,对你的问题:我不明白一个班级怎么样, A,没有对另一个类B的编译时引用,可以将对象强制转换为类B的 实例。这个问题独立于SOAP扩展和 标题。实际上,一旦它被转换为类B,类A如何引用类B的方法,字段等。如果它没有编译时间 参考它? 我认为需要更多细节。 约翰 I have a problem accessing my custom SoapHeader from a SoapExtension. Myextension has no compile time reference to the class derived fromSoapHeader, so how can cast it into a SoapHeader of the correct type?Thanks, Andy 解决方案 XML. John XML.John XML. Ok, I apologize. I thought I had a SOAP Extension which was accessing theheaders as XML. I was mistaken, it accesses them as a SoapHeader-derivedobject. So, to your question: I don''t understand how a class, "A", without acompile-time reference to another class, "B", could cast an object to aninstance of class "B". This question is independent of SOAP Extensions andHeaders. In fact, once it had been cast to class "B", how would class "A"reference the methods, fields, etc., of class "B" if it has no compile-timereference to it? I think more detail is required. John 这篇关于无法在SoapExtension中访问Soapheader的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 11-03 02:52