Tag: wso2esb

如何使用自己的XML配置实现自定义中介?

我正在尝试使用自己的XML配置为WSO2 ESB(4.5.1)实现自定义中介。 我可以使用中介作为类中介使用以下配置: 但是,我想要实现的是能够使用如下语法调用中介: 在WSO2 ESB关于此问题的可用帮助之后,我遇到以下错误,因为我尝试使用具有自己的XML配置的介体创建代理: ERROR – MediatorFactoryFinder Unknown mediator referenced by configuration element : {test:mediator}TestMediator 不用说,我已经编写了两个文本文件,分别包含介体工厂和序列化程序类的完全限定类名,并将它们放在bundle jar文件的META-INF/services目录中。 这是我的mediator类的源代码: package test.synapse.mediator; import org.apache.synapse.MessageContext; import org.apache.synapse.mediators.AbstractMediator; public class TestMediator extends AbstractMediator { public boolean mediate(MessageContext context) { System.out.println(“TestMediator mediating!”); return true; } } 这是我的中介工厂的代码: package test.synapse.mediator; import java.util.Properties; import javax.xml.namespace.QName; import org.apache.axiom.om.OMElement; import org.apache.synapse.Mediator; import […]

访问NTLM安全WS通过WSO2ESB

大家好我正在尝试在WSO2ESB上设置代理服务以访问NTLMv2安全WS。 我创建了一个调解器类来实现这一目标,但到目前为止还没有运气,我一直保持401状态 这是代码。 代理服务: 调解员类: public class NTLMAuthMediator extends AbstractMediator { private String domain; private String host; private String port; private String username; private String password; public boolean mediate(MessageContext context) { org.apache.axis2.context.MessageContext axis2MsgContext; axis2MsgContext = ((Axis2MessageContext) context).getAxis2MessageContext(); String authString = (String)tmp.get(“Authorization”); HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); setCredentials(auth); List authSchemes = new ArrayList(); authSchemes.add(HttpTransportProperties.Authenticator.NTLM); auth.setAuthSchemes(authSchemes); auth.setPreemptiveAuthentication(true); […]

身份validation流程中grant_type = client_credentials和grant_type =密码之间的区别?

我想了解Authentication或OAuth2 Flow概念中grant_type=client_credentials和grant_type=password之间的区别。 我关注以下网站: http://help.atavist.com/api:authentication http://apiwiki.poken.com/authentication/oauth2 就JavaScript开发中使用gran_type ,我以not secure方式设定grant_type=password 。 但我还是有些人可以帮助理解这个概念。 我还观察到grant_type=client_credentials不提供“ refresh_token ”,它只提供access_token ,其中grant_type=password提供access_token和refresh_token 。 希望得到详细的解释。 我正在为OAuth2使用WSO2 API Manager进行应用程序开发

WSO2 ESB无法将完整的JSON数据转换为XML

我正在建造一个POC。 我为Google Plus创建了传递代理服务。 不使用任何代理服务我得到这是我的输出: { “kind”:”plus#person”, “etag”:”\”ExituU7aUpmkkfyD52VulzptThw/4J1clegrhxYC2fsJOu2XWCs1Ewg\””, “id”:”117488614303967062311″, “displayName”:”Abhi NeoN”, “name”:{ “familyName”:”NeoN”, “givenName”:”Abhi” }, “tagline”:”hey guys ! ssup!! check out ma recnt videos… uploaded”, “gender”:”male”, “aboutMe”:”\u003cb\u003ehie, abhishek – ma full name \u003c/b\u003e\u003cdiv\u003e\u003cb\u003em a DANCER ,\u003c/b\u003e\u003c/div\u003e\u003cdiv\u003e\u003cb\u003ei luv ma dancing .\u003c/b\u003e\u003c/div\u003e\u003cdiv\u003e\u003cb\u003ei care ma dancing ,\u003c/b\u003e\u003c/div\u003e\u003cdiv\u003e\u003cb\u003ei jus hv a gr8 thng in me dats ma dancing.\u003c/b\u003e\u003c/div\u003e”, “relationshipStatus”:”single”, “url”:”https://plus.google.com/117488614303967062311″, […]